Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local properties; do
- local hash = game:HttpGet("http://setup.roblox.com/versionQTStudio")
- local data = game:HttpGet(string.format("http://setup.roblox.com/%s-API-Dump.json", hash))
- local filter = game:GetService('HttpService'):JSONDecode(data);
- properties = filter.Classes;
- end
- local function find(tb, val)
- for i, v in next, tb do
- if v == val then
- return true
- end
- end
- return false
- end
- local function GetProperties(obj)
- local props = {};
- for _, t in next, properties do
- local class = t.Name
- for i, v in next, t.Members do
- if obj:IsA(class) then
- if v.MemberType == 'Property' then
- local failed = false;
- if v.Tags then
- if find(v.Tags, 'Deprecated') then failed = true end
- if find(v.Tags, 'Hidden') then failed = true end
- if find(v.Tags, 'NotScriptable') then failed = true end
- end
- if class and obj:IsA(class) and (not failed) then
- table.insert(props, {
- Name = v.Name;
- Value = obj[v.Name];
- })
- end
- end
- end
- end
- end
- return props
- end
- local mt = getrawmetatable(game)
- local old = mt.__index
- if setreadonly then
- setreadonly(mt, false)
- elseif make_writeable then
- make_writeable(mt)
- end
- local newcclosure = newcclosure or protect_function;
- local checkcaller = checkcaller or is_protosmasher_caller;
- mt.__index = newcclosure(function(self, key)
- if checkcaller() then
- if key == 'GetProperties' then return GetProperties end
- end
- return old(self, key)
- end)
Advertisement
Add Comment
Please, Sign In to add comment