The Below code: How would I make a function which returns all the properties of the given instance? - #4 by CheezeNibletz
local ClassProperties do
-- ClassProperties["Part"] example
-- returns table and enable http thing
ClassProperties = {}
local HttpService = game:GetService("HttpService")
local Data = HttpService:JSONDecode(HttpService:GetAsync("https://anaminus.github.io/rbx/json/api/latest.json"))
for i = 1, #Data do
local Table = Data[i]
local Type = Table.type
if Type == "Class" then
local ClassData = {}
local Superclass = ClassProperties[Table.Superclass]
if Superclass then
for j = 1, #Superclass do
ClassData[j] = Superclass[j]
end
end
ClassProperties[Table.Name] = ClassData
elseif Type == "Property" then
if not next(Table.tags) then
local Class = ClassProperties[Table.Class]
local Property = Table.Name
local Inserted
for j = 1, #Class do
if Property < Class[j] then -- Determine whether `Property` precedes `Class[j]` alphabetically
Inserted = true
table.insert(Class, j, Property)
break
end
end
if not Inserted then
table.insert(Class, Property)
end
end
elseif Type == "Function" then
elseif Type == "YieldFunction" then
elseif Type == "Event" then
elseif Type == "Callback" then
elseif Type == "Enum" then
elseif Type == "EnumItem" then
end
end
end
In Moon Animation Script:
-- libraries
do
for _, lib in pairs(script.Parent.Libraries:GetChildren()) do
if lib.ClassName == "ModuleScript" then
global[lib.Name] = require(lib)
end
end
end
I can’t know difference between <do ~ end> and only code.
do
--code
end