This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "prefix": [ | |
| "Air" | |
| ], | |
| "name": [ | |
| "ROBLOX", | |
| "ROBLOXia", | |
| "ROBLOXian", | |
| "Blox", | |
| "Robo", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --[[ | |
| Instructions: | |
| 1) Set 'radius' and 'height' to non-zero positive numbers (x > 0) | |
| 2) Copy & Paste this code into Command Bar | |
| 3) Press Enter | |
| --]] | |
| local radius = 4 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| local version = "1.0.0" | |
| local plugin = PluginManager():CreatePlugin() | |
| local toolbar = plugin:CreateToolbar("RbxLink") | |
| local button = toolbar:CreateButton("RbxLink", "RbxLink Plugin", "") | |
| local http = game:GetService("HttpService") | |
| local endpoint = "http://localhost:8080/StudioLink" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| local tbl = {...} | |
| for i,v in pairs(tbl) do | |
| -- Loop | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function pairs(tbl) | |
| return next, tbl, nil | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| local tbl = {...} | |
| for i = 1,#tbl do | |
| local v = tbl[i] | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| local data = {} | |
| for i = 1,1000000 do | |
| data[i] = 1 | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function Benchmark(title, iterations, func) | |
| print("Running " .. title .. "...") | |
| local start = tick() -- Start time | |
| for i = 1,iterations do | |
| func() | |
| end | |
| local duration = (tick() - start) | |
| print(title .. " duration: " .. duration) | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- Generic for loop: | |
| Benchmark("Generic", 40, function() | |
| for i,v in pairs(data) do | |
| -- Foobar | |
| end | |
| end) | |
| -- Numeric for loop: | |
| Benchmark("Numeric", 40, function() | |
| for i = 1,#data do |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| local mixedTbl = { | |
| "test", "hello", "hi", | |
| kills = 32, | |
| deaths = 16 | |
| } | |
| -- This table has both numeric indices and hashed indices. | |
| -- e.g. 'mixedTbl[1]' and 'mixedTbl.kills' |
OlderNewer