Fix NilInstance Attachments; Add SavePlayers

A lot of other Options added.
Basically re-wrote a lot of code.
This commit is contained in:
htt-py
2024-04-07 04:32:13 +02:00
parent 06edc4d67e
commit 08c4273ea5
5 changed files with 953 additions and 609 deletions

View File

@@ -116,10 +116,10 @@ https://discord.com/invite/wx4ThpAsmw **/** https://discord.gg/wx4ThpAsmw<br />
* [x] RemovePlayerCharacters
* [x] SavePlayers
* [x] ShowStatus
* [ ] Add Drawing Library support for ShowStatus
- [ ] Add Drawing Library support for ShowStatus
* ~~[-] IsolatePlayerGui~~ Use IsolateLocalPlayer instead
* [ ] Callback
* [ ] Clipboard
* [ ] Clipboard/CopyToClipboard
* [ ] Binary (rbxl/rbxm)
- [ ] Support for as many Executors as possible (🤢🤮)
- [x] ~~Use getspecialinfo fallback function carefully as it's hardcoded~~ Useless because there's no way to tell if the Property Values of those instances are default or not

View File

@@ -2,6 +2,7 @@
-- ! Source: https://github.com/MaximumADHD/Roblox-File-Format/blob/main/Plugins/GenerateApiDump/PropertyPatches.lua
-- ! Extras: https://github.com/rojo-rbx/rbx-dom/tree/master/patches
-- ! Extras: https://github.com/Dekkonot/rbx-instance-serializer/blob/23f772f6f78af879a21faa9fea3e6c4f93d1cdee/src/API.lua#L19
export type GetSet = string | {
Get: string,

View File

@@ -0,0 +1,158 @@
local ClassList
local GlobalSettings, GlobalBasicSettings = settings(), UserSettings()
local service = setmetatable({}, {
__index = function(Self, Name)
local Service = game:GetService(Name) or GlobalSettings:GetService(Name) or GlobalBasicSettings:GetService(Name)
Self[Name] = Service
return Service
end,
})
service.HttpService.HttpEnabled = true
local function ArrayToDictionary(Table, HybridMode)
local tmp = table.create(#Table)
if HybridMode == "adjust" then
for Some1, Some2 in Table do
if type(Some1) == "number" then
tmp[Some2] = true
elseif type(Some2) == "table" then
tmp[Some1] = ArrayToDictionary(Some2, "adjust") -- Some1 is Class, Some2 is Name
else
tmp[Some1] = Some2
end
end
else
for _, Key in Table do
tmp[Key] = true
end
end
return tmp
end
local function Find(String, Pattern)
return string.find(String, Pattern, nil, true)
end
do
-- TODO: More @ https://github.com/Dekkonot/rbx-instance-serializer/blob/23f772f6f78af879a21faa9fea3e6c4f93d1cdee/src/API.lua#L19
local function FetchAPI()
local API_Dump_Url =
"https://raw.githubusercontent.com/MaximumADHD/Roblox-Client-Tracker/roblox/Mini-API-Dump.json"
local API_Dump = service.HttpService:GetAsync(API_Dump_Url, true)
local API_Classes = service.HttpService:JSONDecode(API_Dump).Classes
local classList = {}
for _index_0 = 1, #API_Classes do
local API_Class = API_Classes[_index_0]
local ClassMembers = API_Class.Members
local Class = {}
local ClassName = API_Class.Name
local ClassTags = API_Class.Tags
if ClassTags then
ClassTags = ArrayToDictionary(ClassTags)
end
-- ClassInfo.Name = ClassName
Class.Tags = ClassTags -- or {}
Class.Superclass = API_Class.Superclass
local ClassProperties = {}
for _index_1 = 1, #ClassMembers do
local Member = ClassMembers[_index_1]
if Member.MemberType == "Property" then
local PropertyName = Member.Name
-- ? We avoid this as some Instances like services may have this property locked and thus make file unable to open and it's not even used by Roblox anyways as Parent-Child relationship is done by embedding/nesting
local Serialization = Member.Serialization
if Serialization.CanLoad then
local Ignored = false
if not (Ignored and Ignored[PropertyName]) then
local Allowed = true
local MemberTags = Member.Tags
local Special
if MemberTags then
MemberTags = ArrayToDictionary(MemberTags)
Special = MemberTags.NotScriptable
if MemberTags.Deprecated then
Allowed = nil
end
end
if Allowed then
local ValueType = Member.ValueType
local Property = {
Name = PropertyName,
Category = ValueType.Category,
Default = Member.Default,
-- Tags = MemberTags,
ValueType = ValueType.Name,
}
if Special then
Property.Special = true
end
ClassProperties[PropertyName] = Property
end
end
end
end
end
Class.Properties = ClassProperties
classList[ClassName] = Class
end
-- classList.Instance.Properties.Parent = nil -- ? Not sure if this is a better option than filtering throguh properties to remove this
return classList
end
local ok, result = pcall(FetchAPI)
if ok then
ClassList = result
else
warn(result)
return
end
end
local F = Instance.new("Folder")
for Class in ClassList do
local o, r = pcall(Instance.new, Class)
local x = r
if not o then
r = game:FindFirstChild(Class, true)
if not r then
r = game:FindFirstChildWhichIsA(Class, true)
end
end
if r then
o, r = pcall(function(_, _2)
_.Parent = _2
end, r, F)
if not o then
if Find(r, "locked") or Find(r, "Cannot change") or Find(r, "Invalid parent for Service") then
continue
end
warn(Class, r)
end
elseif not (Find(x, "Unable to create an Instance") or Find(x, "The current thread cannot create")) then
print(Class, x)
end
end

View File

@@ -1408,7 +1408,9 @@ local IgnoreSharedStrings = OPTIONS.IgnoreSharedStrings
end
end
If you can't move the Camera, run the scripts in the Studio Command Bar:
workspace.CurrentCamera.CameraType = Enum.CameraType.Fixed
This file was generated with the following settings:
]] .. service.HttpService:JSONEncode(OPTIONS) .. "\n]]")

File diff suppressed because it is too large Load Diff