Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local exploit_name = "Dark"
- local identity = 4
- function printidentity()
- if (identity == 0) then identity = 4 else identity = identity end
- print("Current identity is "..identity)
- end
- function setidentity(id)
- if (id > 4) then
- error("Cannot set to a higher identity")
- else
- identity = id
- end
- end
- function getidentity()
- return identity
- end
- function getexecutorname()
- if (exploit_name == "") then
- exploit_name = "Dark"
- else
- return exploit_name
- end
- function identifyexecutor()
- return exploit_name
- end
- function GetObjects(obj)
- game:GetService("InsertService"):LoadLocalAsset(obj)
- end
- function rconsoleclear()
- print(("\n"):rep(20))
- end
- function consoleclear()
- print(("\n"):rep(20))
- end
- function getscriptbytecode(str)
- local byteArray = {}
- for i = 1, #str do
- local c = string.sub(str, i, i)
- table.insert(byteArray, string.byte(c))
- end
- return byteArray
- end
- function isrbxactive()
- UIS = game:GetService("UserInputService")
- UIS.WindowFocused:Connect(function()
- return true
- end)
- UIS.WindowFocusReleased:Connect(function()
- return false
- end)
- end
- -- LMFAO imagine lol
- function saveinstance()
- error("saveinstance could not save this game")
- end
- function gethui()
- return game.CoreGui or game.Players.LocalPlayer.PlayerGui
- end
- function isluau()
- return _VERSION == "Luau"
- end
- function loadstring(scrpt)
- execscript = Instance.new("LocalScript")
- execscript.Parent = script
- execscript.Source = scrpt
- return execscript
- end
- -- hacky shit i dont know who the fu wants this like this
- -- no c++ so it stays 60 lmfao
- function setfpscap(thefps)
- RunService = game:GetService("RunService")
- TARGET_FRAME_RATE = math.min(thefps, 60)
- local function onPreSimulation()
- startTime = os.clock()
- while os.clock() - startTime < 1 / TARGET_FRAME_RATE do
- -- nothin
- end
- end
- RunService.PreSimulation:DisconnectAll()
- RunService.PreSimulation:Connect(onPreSimulation)
- return thefps
- end
- function getinstances()
- local instances = {}
- local function allinstance(parent)
- for _, child in ipairs(parent:GetChildren()) do
- table.insert(instances, child)
- allinstance(child)
- end
- end
- allinstance(game)
- return instances
- end
- function getscripts()
- local scripts = {}
- local function allscripts(parent)
- for _, child in ipairs(parent:GetChildren()) do
- if child:IsA("LocalScript") or child:IsA("Script") or child:IsA("ModuleScript") then
- table.insert(scripts, child)
- end
- allscripts(child)
- end
- end
- allscripts(game)
- return scripts
- end
- function getnilinstances()
- local nilInstances = {}
- local function updateNilInstances(descendant)
- if descendant.Parent == nil then
- table.insert(nilInstances, descendant)
- else
- for i, v in ipairs(nilInstances) do
- if v == descendant then
- table.remove(nilInstances, i)
- break
- end
- end
- end
- end
- game.DescendantRemoving:Connect(function(descendant)
- updateNilInstances(descendant)
- end)
- game.DescendantAdded:Connect(function(descendant)
- updateNilInstances(descendant)
- end)
- return nilInstances
- end
- local is_executor_closure = is_syn_closure or is_fluxus_closure or is_sentinel_closure or is_krnl_closure or is_proto_closure or is_calamari_closure or is_electron_closure or is_elysian_closure
- local dbg = {}
- function getcallingscript()
- local s = debug.info(1, 's')
- for i, v in next, game:GetDescendants() do
- if v:GetFullName() == s then return v end
- end
- return nil
- end
- function dbg.getinfo(thread)
- local CurrentLine = tonumber(debug.info(thread, 'l'))
- local Source = debug.info(thread, 's')
- local name = debug.info(thread, 'n')
- local numparams, isvrg = debug.info(thread, 'a')
- if #name == 0 then name = nil end
- local a, b = debug.info(thread, 'a')
- return {
- ['currentline'] = CurrentLine,
- ['Source'] = Source,
- ['name'] = tostring(name),
- ['numparams'] = tonumber(numparams),
- ['is_vararg'] = isvrg and 1 or 0,
- ['short_src'] = tostring(Source:sub(1, 60))
- }
- end
- return dbg
- -----------------------------
- wait()
- -- Gui to Lua
- -- Version: 3.6
- -- Instances:
- local syntax = Instance.new("ScreenGui")
- local Frame = Instance.new("Frame")
- local TextLabel = Instance.new("TextLabel")
- local TextButton = Instance.new("TextButton")
- local TextButton_2 = Instance.new("TextButton")
- local EditorFrame = Instance.new("ScrollingFrame")
- local Source = Instance.new("TextBox")
- local Globals_ = Instance.new("TextLabel")
- local Keywords_ = Instance.new("TextLabel")
- local RemoteHighlight_ = Instance.new("TextLabel")
- local Strings_ = Instance.new("TextLabel")
- local Tokens_ = Instance.new("TextLabel")
- local Numbers_ = Instance.new("TextLabel")
- local Strings2_ = Instance.new("TextLabel")
- local Strings3_ = Instance.new("TextLabel")
- local Comments_ = Instance.new("TextLabel")
- local Comments2_ = Instance.new("TextLabel")
- local Lines = Instance.new("TextLabel")
- -- Properties:
- syntax.Name = "syntax"
- local success, err = pcall(function()
- syntax.Parent = game.CoreGui
- print("coregui access")
- end)
- if not success then
- syntax.Parent = game.Players.LocalPlayer.PlayerGui
- print("coregui error gethui() will equal playergui not coregui.")
- end
- Frame.Parent = syntax
- Frame.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
- Frame.BorderColor3 = Color3.fromRGB(0, 0, 0)
- Frame.BorderSizePixel = 0
- Frame.Position = UDim2.new(0, 45, 0, 147)
- Frame.Size = UDim2.new(0, 613, 0, 292)
- TextLabel.Parent = Frame
- TextLabel.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- TextLabel.BackgroundTransparency = 1.000
- TextLabel.BorderColor3 = Color3.fromRGB(0, 0, 0)
- TextLabel.BorderSizePixel = 0
- TextLabel.Position = UDim2.new(-0.0151515156, 0, 0, 0)
- TextLabel.Size = UDim2.new(0, 103, 0, 34)
- TextLabel.Font = Enum.Font.AmaticSC
- TextLabel.Text = "DARK"
- TextLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
- TextLabel.TextScaled = true
- TextLabel.TextSize = 14.000
- TextLabel.TextWrapped = true
- TextButton.Parent = Frame
- TextButton.BackgroundColor3 = Color3.fromRGB(70, 70, 70)
- TextButton.BorderColor3 = Color3.fromRGB(0, 0, 0)
- TextButton.Position = UDim2.new(0, 0, 0, 292)
- TextButton.Size = UDim2.new(0, 306, 0, 48)
- TextButton.Font = Enum.Font.SourceSans
- TextButton.Text = "Execute"
- TextButton.TextColor3 = Color3.fromRGB(255, 255, 255)
- TextButton.TextScaled = true
- TextButton.TextSize = 14.000
- TextButton.TextWrapped = true
- TextButton_2.Parent = Frame
- TextButton_2.BackgroundColor3 = Color3.fromRGB(70, 70, 70)
- TextButton_2.BorderColor3 = Color3.fromRGB(0, 0, 0)
- TextButton_2.Position = UDim2.new(0, 306, 0, 292)
- TextButton_2.Size = UDim2.new(0, 306, 0, 48)
- TextButton_2.Font = Enum.Font.SourceSans
- TextButton_2.Text = "Clear"
- TextButton_2.TextColor3 = Color3.fromRGB(255, 255, 255)
- TextButton_2.TextScaled = true
- TextButton_2.TextSize = 14.000
- TextButton_2.TextWrapped = true
- EditorFrame.Name = "EditorFrame"
- EditorFrame.Parent = Frame
- EditorFrame.BackgroundColor3 = Color3.fromRGB(37, 37, 37)
- EditorFrame.BorderColor3 = Color3.fromRGB(61, 61, 61)
- EditorFrame.BorderSizePixel = 0
- EditorFrame.Position = UDim2.new(0, 0, 0, 34)
- EditorFrame.Size = UDim2.new(0, 613, 0, 257)
- EditorFrame.ZIndex = 3
- EditorFrame.BottomImage = "rbxassetid://148970562"
- EditorFrame.CanvasSize = UDim2.new(0, 0, 0, 0)
- EditorFrame.BottomImage = "rbxassetid://148970562"
- EditorFrame.HorizontalScrollBarInset = Enum.ScrollBarInset.ScrollBar
- EditorFrame.MidImage = "rbxassetid://148970562"
- EditorFrame.TopImage = "rbxassetid://148970562"
- EditorFrame.ScrollBarThickness = 5
- EditorFrame.TopImage = "rbxassetid://148970562"
- Source.Name = "Source"
- Source.Parent = EditorFrame
- Source.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- Source.BackgroundTransparency = 1.000
- Source.Position = UDim2.new(0, 30, 0, 0)
- Source.Size = UDim2.new(0.950160801, 0, 1, 0)
- Source.ZIndex = 3
- Source.ClearTextOnFocus = false
- Source.Font = Enum.Font.Code
- Source.MultiLine = true
- Source.PlaceholderColor3 = Color3.fromRGB(204, 204, 204)
- Source.Text = ""
- Source.TextColor3 = Color3.fromRGB(204, 204, 204)
- Source.TextSize = 15.000
- Source.TextXAlignment = Enum.TextXAlignment.Left
- Source.TextYAlignment = Enum.TextYAlignment.Top
- Globals_.Name = "Globals_"
- Globals_.Parent = Source
- Globals_.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- Globals_.BackgroundTransparency = 1.000
- Globals_.Size = UDim2.new(1, 0, 1, 0)
- Globals_.ZIndex = 5
- Globals_.Font = Enum.Font.Code
- Globals_.Text = ""
- Globals_.TextColor3 = Color3.fromRGB(132, 214, 247)
- Globals_.TextSize = 15.000
- Globals_.TextXAlignment = Enum.TextXAlignment.Left
- Globals_.TextYAlignment = Enum.TextYAlignment.Top
- Keywords_.Name = "Keywords_"
- Keywords_.Parent = Source
- Keywords_.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- Keywords_.BackgroundTransparency = 1.000
- Keywords_.Size = UDim2.new(1, 0, 1, 0)
- Keywords_.ZIndex = 5
- Keywords_.Font = Enum.Font.Code
- Keywords_.Text = ""
- Keywords_.TextColor3 = Color3.fromRGB(248, 109, 124)
- Keywords_.TextSize = 15.000
- Keywords_.TextXAlignment = Enum.TextXAlignment.Left
- Keywords_.TextYAlignment = Enum.TextYAlignment.Top
- RemoteHighlight_.Name = "RemoteHighlight_"
- RemoteHighlight_.Parent = Source
- RemoteHighlight_.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- RemoteHighlight_.BackgroundTransparency = 1.000
- RemoteHighlight_.Size = UDim2.new(1, 0, 1, 0)
- RemoteHighlight_.ZIndex = 5
- RemoteHighlight_.Font = Enum.Font.Code
- RemoteHighlight_.Text = ""
- RemoteHighlight_.TextColor3 = Color3.fromRGB(0, 144, 255)
- RemoteHighlight_.TextSize = 15.000
- RemoteHighlight_.TextXAlignment = Enum.TextXAlignment.Left
- RemoteHighlight_.TextYAlignment = Enum.TextYAlignment.Top
- Strings_.Name = "Strings_"
- Strings_.Parent = Source
- Strings_.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- Strings_.BackgroundTransparency = 1.000
- Strings_.Size = UDim2.new(1, 0, 1, 0)
- Strings_.ZIndex = 5
- Strings_.Font = Enum.Font.Code
- Strings_.Text = ""
- Strings_.TextColor3 = Color3.fromRGB(173, 241, 149)
- Strings_.TextSize = 15.000
- Strings_.TextXAlignment = Enum.TextXAlignment.Left
- Strings_.TextYAlignment = Enum.TextYAlignment.Top
- Tokens_.Name = "Tokens_"
- Tokens_.Parent = Source
- Tokens_.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- Tokens_.BackgroundTransparency = 1.000
- Tokens_.Size = UDim2.new(1, 0, 1, 0)
- Tokens_.ZIndex = 5
- Tokens_.Font = Enum.Font.Code
- Tokens_.Text = ""
- Tokens_.TextColor3 = Color3.fromRGB(255, 255, 255)
- Tokens_.TextSize = 15.000
- Tokens_.TextXAlignment = Enum.TextXAlignment.Left
- Tokens_.TextYAlignment = Enum.TextYAlignment.Top
- Numbers_.Name = "Numbers_"
- Numbers_.Parent = Source
- Numbers_.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- Numbers_.BackgroundTransparency = 1.000
- Numbers_.Size = UDim2.new(1, 0, 1, 0)
- Numbers_.ZIndex = 4
- Numbers_.Font = Enum.Font.Code
- Numbers_.Text = ""
- Numbers_.TextColor3 = Color3.fromRGB(255, 198, 0)
- Numbers_.TextSize = 15.000
- Numbers_.TextXAlignment = Enum.TextXAlignment.Left
- Numbers_.TextYAlignment = Enum.TextYAlignment.Top
- Strings2_.Name = "Strings2_"
- Strings2_.Parent = Source
- Strings2_.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- Strings2_.BackgroundTransparency = 1.000
- Strings2_.Size = UDim2.new(1, 0, 1, 0)
- Strings2_.ZIndex = 5
- Strings2_.Font = Enum.Font.Code
- Strings2_.Text = ""
- Strings2_.TextColor3 = Color3.fromRGB(173, 241, 149)
- Strings2_.TextSize = 15.000
- Strings2_.TextXAlignment = Enum.TextXAlignment.Left
- Strings2_.TextYAlignment = Enum.TextYAlignment.Top
- Strings3_.Name = "Strings3_"
- Strings3_.Parent = Source
- Strings3_.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- Strings3_.BackgroundTransparency = 1.000
- Strings3_.Size = UDim2.new(1, 0, 1, 0)
- Strings3_.ZIndex = 5
- Strings3_.Font = Enum.Font.Code
- Strings3_.Text = ""
- Strings3_.TextColor3 = Color3.fromRGB(173, 241, 149)
- Strings3_.TextSize = 15.000
- Strings3_.TextXAlignment = Enum.TextXAlignment.Left
- Strings3_.TextYAlignment = Enum.TextYAlignment.Top
- Comments_.Name = "Comments_"
- Comments_.Parent = Source
- Comments_.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- Comments_.BackgroundTransparency = 1.000
- Comments_.Position = UDim2.new(-0.00800000038, 0, 0, 0)
- Comments_.Size = UDim2.new(1, 0, 1, 0)
- Comments_.ZIndex = 5
- Comments_.Font = Enum.Font.Code
- Comments_.Text = ""
- Comments_.TextColor3 = Color3.fromRGB(59, 200, 59)
- Comments_.TextSize = 15.000
- Comments_.TextXAlignment = Enum.TextXAlignment.Left
- Comments_.TextYAlignment = Enum.TextYAlignment.Top
- Comments2_.Name = "Comments2_"
- Comments2_.Parent = Source
- Comments2_.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- Comments2_.BackgroundTransparency = 1.000
- Comments2_.Size = UDim2.new(1, 0, 1, 0)
- Comments2_.ZIndex = 5
- Comments2_.Font = Enum.Font.Code
- Comments2_.Text = ""
- Comments2_.TextColor3 = Color3.fromRGB(59, 200, 59)
- Comments2_.TextSize = 15.000
- Comments2_.TextXAlignment = Enum.TextXAlignment.Left
- Comments2_.TextYAlignment = Enum.TextYAlignment.Top
- Lines.Name = "Lines"
- Lines.Parent = EditorFrame
- Lines.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- Lines.BackgroundTransparency = 1.000
- Lines.Size = UDim2.new(0, 30, 1, 0)
- Lines.ZIndex = 4
- Lines.Font = Enum.Font.Code
- Lines.Text = "0"
- Lines.TextColor3 = Color3.fromRGB(255, 255, 255)
- Lines.TextSize = 15.000
- Lines.TextYAlignment = Enum.TextYAlignment.Top
- -- Scripts:
- local function AMQSF_fake_script() -- syntax.MainScript
- local script = Instance.new('LocalScript', syntax)
- local L_1_ = script.Parent.EditorFrame.Source local L_2_ = Vector2.new(0, 0) local L_3_ = { "getrawmetatable", "game", "workspace", "script", "math", "string", "table", "print", "wait", "BrickColor", "Color3", "next", "pairs", "ipairs", "select", "unpack", "Instance", "Vector2", "Vector3", "CFrame", "Ray", "UDim2", "Enum", "assert", "error", "warn", "tick", "loadstring", "_G", "shared", "getfenv", "setfenv", "newproxy", "setmetatable", "getmetatable", "os", "debug", "pcall", "ypcall", "xpcall", "rawequal", "rawset", "rawget", "tonumber", "tostring", "type", "typeof", "_VERSION", "coroutine", "delay", "require", "spawn", "LoadLibrary", "settings", "stats", "time", "UserSettings", "version", "Axes", "ColorSequence", "Faces", "ColorSequenceKeypoint", "NumberRange", "NumberSequence", "NumberSequenceKeypoint", "gcinfo", "elapsedTime", "collectgarbage", "PhysicalProperties", "Rect", "Region3", "Region3int16", "UDim", "Vector2int16", "Vector3int16" } local L_4_ = { "and", "break", "do", "else", "elseif", "end", "false", "for", "function", "goto", "if", "in", "local", "nil", "not", "or", "repeat", "return", "then", "true", "until", "while" } function G_1_(L_7_arg1, L_8_arg2) local L_9_ = {} for L_13_forvar1, L_14_forvar2 in next, L_8_arg2 do L_9_[L_14_forvar2] = L_14_forvar2 end local L_10_ = { ["="] = true, ["."] = true, [","] = true, ["("] = true, [")"] = true, ["["] = true, ["]"] = true, ["{"] = true, ["}"] = true, [":"] = true, ["*"] = true, ["/"] = true, ["+"] = true, ["-"] = true, ["%"] = true, [";"] = true, ["~"] = true } local L_11_ = "" local L_12_ = string.gsub(L_7_arg1, '\46', function(L_15_arg1) if L_10_[L_15_arg1] then return "\32" else return L_15_arg1 end end) L_11_ = string.gsub(L_12_, '%S+', function(L_16_arg1) if L_9_[L_16_arg1] ~= nil then return L_9_[L_16_arg1] else return (' '):rep(#L_16_arg1) end end) return L_11_ end function G_2_(L_17_arg1) local L_18_ = false local L_19_ = "" L_17_arg1:gsub('\46', function(L_20_arg1) if L_20_arg1 == '"' and L_18_ == false then L_18_ = true L_19_ = L_19_..'"' elseif L_18_ == true and L_20_arg1 == '"' then L_18_ = false L_19_ = L_19_..'"' end if L_18_ == true and L_20_arg1 ~= '"' then L_19_ = L_19_..L_20_arg1 end if L_18_ == false and L_20_arg1 == '"' then elseif L_20_arg1 == "\n" and L_18_ == false then L_19_ = L_19_.."\n" elseif L_20_arg1 == "\t" and L_18_ == false then L_19_ = L_19_.."\t" elseif L_18_ == false then L_19_ = L_19_.." " end end) return L_19_ end function G_3_(L_21_arg1) local L_22_ = false local L_23_ = "" L_21_arg1:gsub('\46', function(L_24_arg1) if L_24_arg1 == "'" and L_22_ == false then L_22_ = true L_23_ = L_23_.."'" elseif L_22_ == true and L_24_arg1 == "'" then L_22_ = false L_23_ = L_23_.."'" end if L_22_ == true and L_24_arg1 ~= "'" then L_23_ = L_23_..L_24_arg1 end if L_22_ == false and L_24_arg1 == "'" then elseif L_24_arg1 == "\n" and L_22_ == false then L_23_ = L_23_.."\n" elseif L_24_arg1 == "\t" and L_22_ == false then L_23_ = L_23_.."\t" elseif L_22_ == false then L_23_ = L_23_.." " end end) return L_23_ end function G_4_(L_25_arg1) local L_26_ = false local L_27_ = "" local L_28_ = 0 L_25_arg1:gsub('\46', function(L_29_arg1) if L_25_arg1:sub(L_28_, L_28_ + 1) == '[[' and L_26_ == false then L_26_ = true L_27_ = L_27_.."[" elseif L_26_ == true and L_25_arg1:sub(L_28_, L_28_ + 1) == ']]' then L_26_ = false L_27_ = L_27_.."]" end if L_26_ == true and L_25_arg1:sub(L_28_, L_28_ + 1) ~= ']]' then L_27_ = L_27_..L_29_arg1 end if L_29_arg1 == "\n" and L_26_ == false then L_27_ = L_27_.."\n" end if L_29_arg1 == "\t" and L_26_ == false then L_27_ = L_27_.."\t" end if L_26_ == false then L_27_ = L_27_.." " end L_28_ = L_28_ + 1 end) return L_27_ end function G_5_(L_30_arg1) local L_31_ = false local L_32_ = "" local L_33_ = 0 L_30_arg1:gsub('\46', function(L_34_arg1) if L_30_arg1:sub(L_33_, L_33_ + 1) == '--' and L_31_ == false then L_31_ = true L_32_ = L_32_..'-' elseif L_31_ == true and L_34_arg1 == '\n' then L_31_ = false end if L_31_ == true then L_32_ = L_32_..L_34_arg1 end if L_31_ == false and L_30_arg1:sub(L_33_, L_33_ + 1) == '--' then elseif L_34_arg1 == "\n" and L_31_ == false then L_32_ = L_32_.."\n" elseif L_34_arg1 == "\t" and L_31_ == false then L_32_ = L_32_.."\t" elseif L_31_ == false then L_32_ = L_32_.." " end L_33_ = L_33_ + 1 end) return L_32_:sub(2) end function G_6_(L_35_arg1) local L_36_ = { ["="] = true, ["."] = true, [","] = true, ["("] = true, [")"] = true, ["["] = true, ["]"] = true, ["{"] = true, ["}"] = true, [":"] = true, ["*"] = true, ["/"] = true, ["+"] = true, ["-"] = true, ["%"] = true, [";"] = true, ["~"] = true } local L_37_ = "" local L_38_ = L_35_arg1:gsub("\46", function(L_39_arg1) if L_36_[L_39_arg1] ~= nil then L_37_ = L_37_..L_39_arg1 elseif L_39_arg1 == "\n" then L_37_ = L_37_..L_39_arg1 elseif L_39_arg1 == "\t" then L_37_ = L_37_..L_39_arg1 else L_37_ = L_37_.." " end end) return L_37_ end function G_7_(L_40_arg1) if typeof(L_40_arg1) == "number" then L_40_arg1 = tostring(L_40_arg1) end local L_41_ = "" local L_42_ = L_40_arg1:gsub("\46", function(L_43_arg1) if tonumber(L_43_arg1) then L_41_ = L_41_..L_43_arg1 elseif L_43_arg1 == "\n" then L_41_ = L_41_..L_43_arg1 elseif L_43_arg1 == "\t" then L_41_ = L_41_..L_43_arg1 else L_41_ = L_41_.." " end end) return L_41_ end function G_8_(L_44_arg1) local L_45_ = false local L_46_ = "" local L_47_ = 0 L_44_arg1:gsub('\46', function(L_48_arg1) if L_44_arg1:sub(L_47_, L_47_ + 3) == '--[[' and L_45_ == false then L_45_ = true L_46_ = L_46_..'-' elseif L_45_ == true and L_44_arg1:sub(L_47_, L_47_ + 1) == ']]' then L_45_ = false L_46_ = L_46_.."]" end if L_45_ == true and L_44_arg1:sub(L_47_, L_47_ + 1) ~= "]]" then L_46_ = L_46_..L_48_arg1 end if L_45_ == false and L_44_arg1:sub(L_47_, L_47_ + 1) == '--' then elseif L_48_arg1 == "\n" and L_45_ == false then L_46_ = L_46_.."\n" elseif L_48_arg1 == "\t" and L_45_ == false then L_46_ = L_46_.."\t" elseif L_45_ == false then L_46_ = L_46_.." " end L_47_ = L_47_ + 1 end) return L_46_:sub(2) end local function L_5_func(L_49_arg1) local L_50_, L_51_ = L_49_arg1.CanvasSize.Y.Offset, L_49_arg1.AbsoluteWindowSize.Y local L_52_ = L_50_ - L_51_ if L_52_ < 0 then L_52_ = 0 end local L_53_ = Vector2.new(L_49_arg1.CanvasPosition.X, L_52_) return L_53_ end print(G_5_'s') wait(.2) local L_6_ = 20 L_1_.Changed:Connect(function() local L_54_ = L_1_.Comments_ local L_55_ = L_1_.Comments2_ local L_56_ = L_1_.Tokens_ local L_57_ = L_1_.Numbers_ local L_58_ = L_1_.Strings_ local L_59_ = L_1_.Strings2_ local L_60_ = L_1_.Strings3_ local L_61_ = L_1_.Keywords_ local L_62_ = L_1_.Globals_ L_54_.Text = " "..G_5_(L_1_.Text) L_55_.Text = ""..G_8_(L_1_.Text) L_58_.Text = G_2_(L_1_.Text) L_59_.Text = G_3_(L_1_.Text) L_60_.Text = G_4_(L_1_.Text):sub(2) L_61_.Text = G_1_(L_1_.Text, L_4_) L_62_.Text = G_1_(L_1_.Text, L_3_) L_56_.Text = G_6_(L_1_.Text) L_57_.Text = G_7_(L_1_.Text) local L_63_ = 1 L_1_.Text:gsub('\n', function() L_63_ = L_63_ + 1 end) L_1_.Parent.Lines.Text = "" for L_64_forvar1 = 1, L_63_ do L_1_.Parent.Lines.Text = L_1_.Parent.Lines.Text..L_64_forvar1.."\n" end L_1_.Parent.CanvasSize = (UDim2.new(0, L_1_.TextBounds.X + 15 + 5, 0, L_1_.TextBounds.Y)) if L_1_.Parent.CanvasPosition.Y == L_2_.Y then L_1_.Parent.CanvasPosition = L_5_func(L_1_.Parent) else L_2_ = L_5_func(L_1_.Parent) end end) L_1_.MouseWheelBackward:Connect(function(L_65_arg1, L_66_arg2) wait(.1) game.TweenService:Create(L_1_.Parent, TweenInfo.new(.1, Enum.EasingStyle.Bounce), { CanvasPosition = L_1_.Parent.CanvasPosition + Vector2.new(0, L_6_) }):Play() L_6_ = L_6_ + 5 wait(1) L_6_ = L_6_ - 5 end) L_1_.MouseWheelForward:Connect(function(L_67_arg1, L_68_arg2) wait(.1) game.TweenService:Create(L_1_.Parent, TweenInfo.new(.5, Enum.EasingStyle.Bounce), { CanvasPosition = L_1_.Parent.CanvasPosition + Vector2.new(0, -L_6_) }):Play() L_6_ = L_6_ + 5 wait(1) L_6_ = L_6_ - 5 end)
- end
- coroutine.wrap(AMQSF_fake_script)()
- local function RJGARLZ_fake_script() -- TextButton.LocalScript
- local script = Instance.new('LocalScript', TextButton)
- exec = script.Parent
- frame = script.Parent.Parent
- editor = script.Parent.Parent.Parent.EditorFrame.Source
- exec.MouseButton1Click:connect(function()
- loadstring(editor.Text)()
- end)
- end
- coroutine.wrap(RJGARLZ_fake_script)()
- local function NTGLZZV_fake_script() -- TextButton_2.LocalScript
- local script = Instance.new('LocalScript', TextButton_2)
- exec = script.Parent
- frame = script.Parent.Parent
- editor = script.Parent.Parent.Parent.EditorFrame.Source
- exec.MouseButton1Click:connect(function()
- editor.Text = ""
- end)
- end
- coroutine.wrap(NTGLZZV_fake_script)()
- local function OFZTV_fake_script() -- Frame.drag
- local script = Instance.new('LocalScript', Frame)
- --Not made by me, check out this video: https://www.youtube.com/watch?v=z25nyNBG7Js&t=22s
- --Put this inside of your Frame and configure the speed if you would like.
- --Enjoy! Credits go to: https://www.youtube.com/watch?v=z25nyNBG7Js&t=22s
- local UIS = game:GetService('UserInputService')
- local frame = script.Parent
- local dragToggle = nil
- local dragSpeed = 0.25
- local dragStart = nil
- local startPos = nil
- local function updateInput(input)
- local delta = input.Position - dragStart
- local position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X,
- startPos.Y.Scale, startPos.Y.Offset + delta.Y)
- game:GetService('TweenService'):Create(frame, TweenInfo.new(dragSpeed), {Position = position}):Play()
- end
- frame.InputBegan:Connect(function(input)
- if (input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch) then
- dragToggle = true
- dragStart = input.Position
- startPos = frame.Position
- input.Changed:Connect(function()
- if input.UserInputState == Enum.UserInputState.End then
- dragToggle = false
- end
- end)
- end
- end)
- UIS.InputChanged:Connect(function(input)
- if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then
- if dragToggle then
- updateInput(input)
- end
- end
- end)
- end
- coroutine.wrap(OFZTV_fake_script)()
- wait()
- ----------------------------------------------------------------------
- local passes, fails, undefined = 0, 0, 0
- local running = 0
- local function getGlobal(path)
- local value = getfenv(0)
- while value ~= nil and path ~= "" do
- local name, nextValue = string.match(path, "^([^.]+)%.?(.*)$")
- value = value[name]
- path = nextValue
- end
- return value
- end
- local function test(name, aliases, callback)
- running += 1
- task.spawn(function()
- if not callback then
- print("⏺️ " .. name)
- elseif not getGlobal(name) then
- fails += 1
- warn("⛔ " .. name)
- else
- local success, message = pcall(callback)
- if success then
- passes += 1
- print("✅ " .. name .. (message and " • " .. message or ""))
- else
- fails += 1
- warn("⛔ " .. name .. " failed: " .. message)
- end
- end
- local undefinedAliases = {}
- for _, alias in ipairs(aliases) do
- if getGlobal(alias) == nil then
- table.insert(undefinedAliases, alias)
- end
- end
- if #undefinedAliases > 0 then
- undefined += 1
- warn("⚠️ " .. table.concat(undefinedAliases, ", "))
- end
- running -= 1
- end)
- end
- -- Header and summary
- print("\n")
- print("UNC Environment Check")
- print("✅ - Pass, ⛔ - Fail, ⏺️ - No test, ⚠️ - Missing aliases\n")
- task.defer(function()
- repeat task.wait() until running == 0
- local rate = math.round(passes / (passes + fails) * 100)
- local outOf = passes .. " out of " .. (passes + fails)
- print("\n")
- print("UNC Summary")
- print("✅ Tested with a " .. rate .. "% success rate (" .. outOf .. ")")
- print("⛔ " .. fails .. " tests failed")
- print("⚠️ " .. undefined .. " globals are missing aliases")
- end)
- -- Cache
- test("cache.invalidate", {}, function()
- local container = Instance.new("Folder")
- local part = Instance.new("Part", container)
- cache.invalidate(container:FindFirstChild("Part"))
- assert(part ~= container:FindFirstChild("Part"), "Reference `part` could not be invalidated")
- end)
- test("cache.iscached", {}, function()
- local part = Instance.new("Part")
- assert(cache.iscached(part), "Part should be cached")
- cache.invalidate(part)
- assert(not cache.iscached(part), "Part should not be cached")
- end)
- test("cache.replace", {}, function()
- local part = Instance.new("Part")
- local fire = Instance.new("Fire")
- cache.replace(part, fire)
- assert(part ~= fire, "Part was not replaced with Fire")
- end)
- test("cloneref", {}, function()
- local part = Instance.new("Part")
- local clone = cloneref(part)
- assert(part ~= clone, "Clone should not be equal to original")
- clone.Name = "Test"
- assert(part.Name == "Test", "Clone should have updated the original")
- end)
- test("compareinstances", {}, function()
- local part = Instance.new("Part")
- local clone = cloneref(part)
- assert(part ~= clone, "Clone should not be equal to original")
- assert(compareinstances(part, clone), "Clone should be equal to original when using compareinstances()")
- end)
- -- Closures
- local function shallowEqual(t1, t2)
- if t1 == t2 then
- return true
- end
- local UNIQUE_TYPES = {
- ["function"] = true,
- ["table"] = true,
- ["userdata"] = true,
- ["thread"] = true,
- }
- for k, v in pairs(t1) do
- if UNIQUE_TYPES[type(v)] then
- if type(t2[k]) ~= type(v) then
- return false
- end
- elseif t2[k] ~= v then
- return false
- end
- end
- for k, v in pairs(t2) do
- if UNIQUE_TYPES[type(v)] then
- if type(t2[k]) ~= type(v) then
- return false
- end
- elseif t1[k] ~= v then
- return false
- end
- end
- return true
- end
- test("checkcaller", {}, function()
- assert(checkcaller(), "Main scope should return true")
- end)
- test("clonefunction", {}, function()
- local function test()
- return "success"
- end
- local copy = clonefunction(test)
- assert(test() == copy(), "The clone should return the same value as the original")
- assert(test ~= copy, "The clone should not be equal to the original")
- end)
- test("getcallingscript", {})
- test("getscriptclosure", {"getscriptfunction"}, function()
- local module = game:GetService("CoreGui").RobloxGui.Modules.Common.Constants
- local constants = getrenv().require(module)
- local generated = getscriptclosure(module)()
- assert(constants ~= generated, "Generated module should not match the original")
- assert(shallowEqual(constants, generated), "Generated constant table should be shallow equal to the original")
- end)
- test("hookfunction", {"replaceclosure"}, function()
- local function test()
- return true
- end
- local ref = hookfunction(test, function()
- return false
- end)
- assert(test() == false, "Function should return false")
- assert(ref() == true, "Original function should return true")
- assert(test ~= ref, "Original function should not be same as the reference")
- end)
- test("iscclosure", {}, function()
- assert(iscclosure(print) == true, "Function 'print' should be a C closure")
- assert(iscclosure(function() end) == false, "Executor function should not be a C closure")
- end)
- test("islclosure", {}, function()
- assert(islclosure(print) == false, "Function 'print' should not be a Lua closure")
- assert(islclosure(function() end) == true, "Executor function should be a Lua closure")
- end)
- test("isexecutorclosure", {"checkclosure", "isourclosure"}, function()
- assert(isexecutorclosure(isexecutorclosure) == true, "Did not return true for an executor global")
- assert(isexecutorclosure(newcclosure(function() end)) == true, "Did not return true for an executor C closure")
- assert(isexecutorclosure(function() end) == true, "Did not return true for an executor Luau closure")
- assert(isexecutorclosure(print) == false, "Did not return false for a Roblox global")
- end)
- test("loadstring", {}, function()
- local animate = game:GetService("Players").LocalPlayer.Character.Animate
- local bytecode = getscriptbytecode(animate)
- local func = loadstring(bytecode)
- assert(type(func) ~= "function", "Luau bytecode should not be loadable!")
- assert(assert(loadstring("return ... + 1"))(1) == 2, "Failed to do simple math")
- assert(type(select(2, loadstring("f"))) == "string", "Loadstring did not return anything for a compiler error")
- end)
- test("newcclosure", {}, function()
- local function test()
- return true
- end
- local testC = newcclosure(test)
- assert(test() == testC(), "New C closure should return the same value as the original")
- assert(test ~= testC, "New C closure should not be same as the original")
- assert(iscclosure(testC), "New C closure should be a C closure")
- end)
- -- Console
- test("rconsoleclear", {"consoleclear"})
- test("rconsolecreate", {"consolecreate"})
- test("rconsoledestroy", {"consoledestroy"})
- test("rconsoleinput", {"consoleinput"})
- test("rconsoleprint", {"consoleprint"})
- test("rconsolesettitle", {"rconsolename", "consolesettitle"})
- -- Crypt
- test("crypt.base64encode", {"crypt.base64.encode", "crypt.base64_encode", "base64.encode", "base64_encode"}, function()
- assert(crypt.base64encode("test") == "dGVzdA==", "Base64 encoding failed")
- end)
- test("crypt.base64decode", {"crypt.base64.decode", "crypt.base64_decode", "base64.decode", "base64_decode"}, function()
- assert(crypt.base64decode("dGVzdA==") == "test", "Base64 decoding failed")
- end)
- test("crypt.encrypt", {}, function()
- local key = crypt.generatekey()
- local encrypted, iv = crypt.encrypt("test", key, nil, "CBC")
- assert(iv, "crypt.encrypt should return an IV")
- local decrypted = crypt.decrypt(encrypted, key, iv, "CBC")
- assert(decrypted == "test", "Failed to decrypt raw string from encrypted data")
- end)
- test("crypt.decrypt", {}, function()
- local key, iv = crypt.generatekey(), crypt.generatekey()
- local encrypted = crypt.encrypt("test", key, iv, "CBC")
- local decrypted = crypt.decrypt(encrypted, key, iv, "CBC")
- assert(decrypted == "test", "Failed to decrypt raw string from encrypted data")
- end)
- test("crypt.generatebytes", {}, function()
- local size = math.random(10, 100)
- local bytes = crypt.generatebytes(size)
- assert(#crypt.base64decode(bytes) == size, "The decoded result should be " .. size .. " bytes long (got " .. #crypt.base64decode(bytes) .. " decoded, " .. #bytes .. " raw)")
- end)
- test("crypt.generatekey", {}, function()
- local key = crypt.generatekey()
- assert(#crypt.base64decode(key) == 32, "Generated key should be 32 bytes long when decoded")
- end)
- test("crypt.hash", {}, function()
- local algorithms = {'sha1', 'sha384', 'sha512', 'md5', 'sha256', 'sha3-224', 'sha3-256', 'sha3-512'}
- for _, algorithm in ipairs(algorithms) do
- local hash = crypt.hash("test", algorithm)
- assert(hash, "crypt.hash on algorithm '" .. algorithm .. "' should return a hash")
- end
- end)
- --- Debug
- test("debug.getconstant", {}, function()
- local function test()
- print("Hello, world!")
- end
- assert(debug.getconstant(test, 1) == "print", "First constant must be print")
- assert(debug.getconstant(test, 2) == nil, "Second constant must be nil")
- assert(debug.getconstant(test, 3) == "Hello, world!", "Third constant must be 'Hello, world!'")
- end)
- test("debug.getconstants", {}, function()
- local function test()
- local num = 5000 .. 50000
- print("Hello, world!", num, warn)
- end
- local constants = debug.getconstants(test)
- assert(constants[1] == 50000, "First constant must be 50000")
- assert(constants[2] == "print", "Second constant must be print")
- assert(constants[3] == nil, "Third constant must be nil")
- assert(constants[4] == "Hello, world!", "Fourth constant must be 'Hello, world!'")
- assert(constants[5] == "warn", "Fifth constant must be warn")
- end)
- test("debug.getinfo", {}, function()
- local types = {
- source = "string",
- short_src = "string",
- func = "function",
- what = "string",
- currentline = "number",
- name = "string",
- nups = "number",
- numparams = "number",
- is_vararg = "number",
- }
- local function test(...)
- print(...)
- end
- local info = debug.getinfo(test)
- for k, v in pairs(types) do
- assert(info[k] ~= nil, "Did not return a table with a '" .. k .. "' field")
- assert(type(info[k]) == v, "Did not return a table with " .. k .. " as a " .. v .. " (got " .. type(info[k]) .. ")")
- end
- end)
- test("debug.getproto", {}, function()
- local function test()
- local function proto()
- return true
- end
- end
- local proto = debug.getproto(test, 1, true)[1]
- local realproto = debug.getproto(test, 1)
- assert(proto, "Failed to get the inner function")
- assert(proto() == true, "The inner function did not return anything")
- if not realproto() then
- return "Proto return values are disabled on this executor"
- end
- end)
- test("debug.getprotos", {}, function()
- local function test()
- local function _1()
- return true
- end
- local function _2()
- return true
- end
- local function _3()
- return true
- end
- end
- for i in ipairs(debug.getprotos(test)) do
- local proto = debug.getproto(test, i, true)[1]
- local realproto = debug.getproto(test, i)
- assert(proto(), "Failed to get inner function " .. i)
- if not realproto() then
- return "Proto return values are disabled on this executor"
- end
- end
- end)
- test("debug.getstack", {}, function()
- local _ = "a" .. "b"
- assert(debug.getstack(1, 1) == "ab", "The first item in the stack should be 'ab'")
- assert(debug.getstack(1)[1] == "ab", "The first item in the stack table should be 'ab'")
- end)
- test("debug.getupvalue", {}, function()
- local upvalue = function() end
- local function test()
- print(upvalue)
- end
- assert(debug.getupvalue(test, 1) == upvalue, "Unexpected value returned from debug.getupvalue")
- end)
- test("debug.getupvalues", {}, function()
- local upvalue = function() end
- local function test()
- print(upvalue)
- end
- local upvalues = debug.getupvalues(test)
- assert(upvalues[1] == upvalue, "Unexpected value returned from debug.getupvalues")
- end)
- test("debug.setconstant", {}, function()
- local function test()
- return "fail"
- end
- debug.setconstant(test, 1, "success")
- assert(test() == "success", "debug.setconstant did not set the first constant")
- end)
- test("debug.setstack", {}, function()
- local function test()
- return "fail", debug.setstack(1, 1, "success")
- end
- assert(test() == "success", "debug.setstack did not set the first stack item")
- end)
- test("debug.setupvalue", {}, function()
- local function upvalue()
- return "fail"
- end
- local function test()
- return upvalue()
- end
- debug.setupvalue(test, 1, function()
- return "success"
- end)
- assert(test() == "success", "debug.setupvalue did not set the first upvalue")
- end)
- -- Filesystem
- if isfolder and makefolder and delfolder then
- if isfolder(".tests") then
- delfolder(".tests")
- end
- makefolder(".tests")
- end
- test("readfile", {}, function()
- writefile(".tests/readfile.txt", "success")
- assert(readfile(".tests/readfile.txt") == "success", "Did not return the contents of the file")
- end)
- test("listfiles", {}, function()
- makefolder(".tests/listfiles")
- writefile(".tests/listfiles/test_1.txt", "success")
- writefile(".tests/listfiles/test_2.txt", "success")
- local files = listfiles(".tests/listfiles")
- assert(#files == 2, "Did not return the correct number of files")
- assert(isfile(files[1]), "Did not return a file path")
- assert(readfile(files[1]) == "success", "Did not return the correct files")
- makefolder(".tests/listfiles_2")
- makefolder(".tests/listfiles_2/test_1")
- makefolder(".tests/listfiles_2/test_2")
- local folders = listfiles(".tests/listfiles_2")
- assert(#folders == 2, "Did not return the correct number of folders")
- assert(isfolder(folders[1]), "Did not return a folder path")
- end)
- test("writefile", {}, function()
- writefile(".tests/writefile.txt", "success")
- assert(readfile(".tests/writefile.txt") == "success", "Did not write the file")
- local requiresFileExt = pcall(function()
- writefile(".tests/writefile", "success")
- assert(isfile(".tests/writefile.txt"))
- end)
- if not requiresFileExt then
- return "This executor requires a file extension in writefile"
- end
- end)
- test("makefolder", {}, function()
- makefolder(".tests/makefolder")
- assert(isfolder(".tests/makefolder"), "Did not create the folder")
- end)
- test("appendfile", {}, function()
- writefile(".tests/appendfile.txt", "su")
- appendfile(".tests/appendfile.txt", "cce")
- appendfile(".tests/appendfile.txt", "ss")
- assert(readfile(".tests/appendfile.txt") == "success", "Did not append the file")
- end)
- test("isfile", {}, function()
- writefile(".tests/isfile.txt", "success")
- assert(isfile(".tests/isfile.txt") == true, "Did not return true for a file")
- assert(isfile(".tests") == false, "Did not return false for a folder")
- assert(isfile(".tests/doesnotexist.exe") == false, "Did not return false for a nonexistent path (got " .. tostring(isfile(".tests/doesnotexist.exe")) .. ")")
- end)
- test("isfolder", {}, function()
- assert(isfolder(".tests") == true, "Did not return false for a folder")
- assert(isfolder(".tests/doesnotexist.exe") == false, "Did not return false for a nonexistent path (got " .. tostring(isfolder(".tests/doesnotexist.exe")) .. ")")
- end)
- test("delfolder", {}, function()
- makefolder(".tests/delfolder")
- delfolder(".tests/delfolder")
- assert(isfolder(".tests/delfolder") == false, "Failed to delete folder (isfolder = " .. tostring(isfolder(".tests/delfolder")) .. ")")
- end)
- test("delfile", {}, function()
- writefile(".tests/delfile.txt", "Hello, world!")
- delfile(".tests/delfile.txt")
- assert(isfile(".tests/delfile.txt") == false, "Failed to delete file (isfile = " .. tostring(isfile(".tests/delfile.txt")) .. ")")
- end)
- test("loadfile", {}, function()
- writefile(".tests/loadfile.txt", "return ... + 1")
- assert(assert(loadfile(".tests/loadfile.txt"))(1) == 2, "Failed to load a file with arguments")
- writefile(".tests/loadfile.txt", "f")
- local callback, err = loadfile(".tests/loadfile.txt")
- assert(err and not callback, "Did not return an error message for a compiler error")
- end)
- test("dofile", {})
- -- Input
- test("isrbxactive", {"isgameactive"}, function()
- assert(type(isrbxactive()) == "boolean", "Did not return a boolean value")
- end)
- test("mouse1click", {})
- test("mouse1press", {})
- test("mouse1release", {})
- test("mouse2click", {})
- test("mouse2press", {})
- test("mouse2release", {})
- test("mousemoveabs", {})
- test("mousemoverel", {})
- test("mousescroll", {})
- -- Instances
- test("fireclickdetector", {}, function()
- local detector = Instance.new("ClickDetector")
- fireclickdetector(detector, 50, "MouseHoverEnter")
- end)
- test("getcallbackvalue", {}, function()
- local bindable = Instance.new("BindableFunction")
- local function test()
- end
- bindable.OnInvoke = test
- assert(getcallbackvalue(bindable, "OnInvoke") == test, "Did not return the correct value")
- end)
- test("getconnections", {}, function()
- local types = {
- Enabled = "boolean",
- ForeignState = "boolean",
- LuaConnection = "boolean",
- Function = "function",
- Thread = "thread",
- Fire = "function",
- Defer = "function",
- Disconnect = "function",
- Disable = "function",
- Enable = "function",
- }
- local bindable = Instance.new("BindableEvent")
- bindable.Event:Connect(function() end)
- local connection = getconnections(bindable.Event)[1]
- for k, v in pairs(types) do
- assert(connection[k] ~= nil, "Did not return a table with a '" .. k .. "' field")
- assert(type(connection[k]) == v, "Did not return a table with " .. k .. " as a " .. v .. " (got " .. type(connection[k]) .. ")")
- end
- end)
- test("getcustomasset", {}, function()
- writefile(".tests/getcustomasset.txt", "success")
- local contentId = getcustomasset(".tests/getcustomasset.txt")
- assert(type(contentId) == "string", "Did not return a string")
- assert(#contentId > 0, "Returned an empty string")
- assert(string.match(contentId, "rbxasset://") == "rbxasset://", "Did not return an rbxasset url")
- end)
- test("gethiddenproperty", {}, function()
- local fire = Instance.new("Fire")
- local property, isHidden = gethiddenproperty(fire, "size_xml")
- assert(property == 5, "Did not return the correct value")
- assert(isHidden == true, "Did not return whether the property was hidden")
- end)
- test("sethiddenproperty", {}, function()
- local fire = Instance.new("Fire")
- local hidden = sethiddenproperty(fire, "size_xml", 10)
- assert(hidden, "Did not return true for the hidden property")
- assert(gethiddenproperty(fire, "size_xml") == 10, "Did not set the hidden property")
- end)
- test("gethui", {}, function()
- assert(typeof(gethui()) == "Instance", "Did not return an Instance")
- end)
- test("getinstances", {}, function()
- assert(getinstances()[1]:IsA("Instance"), "The first value is not an Instance")
- end)
- test("getnilinstances", {}, function()
- assert(getnilinstances()[1]:IsA("Instance"), "The first value is not an Instance")
- assert(getnilinstances()[1].Parent == nil, "The first value is not parented to nil")
- end)
- test("isscriptable", {}, function()
- local fire = Instance.new("Fire")
- assert(isscriptable(fire, "size_xml") == false, "Did not return false for a non-scriptable property (size_xml)")
- assert(isscriptable(fire, "Size") == true, "Did not return true for a scriptable property (Size)")
- end)
- test("setscriptable", {}, function()
- local fire = Instance.new("Fire")
- local wasScriptable = setscriptable(fire, "size_xml", true)
- assert(wasScriptable == false, "Did not return false for a non-scriptable property (size_xml)")
- assert(isscriptable(fire, "size_xml") == true, "Did not set the scriptable property")
- fire = Instance.new("Fire")
- assert(isscriptable(fire, "size_xml") == false, "⚠️⚠️ setscriptable persists between unique instances ⚠️⚠️")
- end)
- test("setrbxclipboard", {})
- -- Metatable
- test("getrawmetatable", {}, function()
- local metatable = { __metatable = "Locked!" }
- local object = setmetatable({}, metatable)
- assert(getrawmetatable(object) == metatable, "Did not return the metatable")
- end)
- test("hookmetamethod", {}, function()
- local object = setmetatable({}, { __index = newcclosure(function() return false end), __metatable = "Locked!" })
- local ref = hookmetamethod(object, "__index", function() return true end)
- assert(object.test == true, "Failed to hook a metamethod and change the return value")
- assert(ref() == false, "Did not return the original function")
- end)
- test("getnamecallmethod", {}, function()
- local method
- local ref
- ref = hookmetamethod(game, "__namecall", function(...)
- if not method then
- method = getnamecallmethod()
- end
- return ref(...)
- end)
- game:GetService("Lighting")
- assert(method == "GetService", "Did not get the correct method (GetService)")
- end)
- test("isreadonly", {}, function()
- local object = {}
- table.freeze(object)
- assert(isreadonly(object), "Did not return true for a read-only table")
- end)
- test("setrawmetatable", {}, function()
- local object = setmetatable({}, { __index = function() return false end, __metatable = "Locked!" })
- local objectReturned = setrawmetatable(object, { __index = function() return true end })
- assert(object, "Did not return the original object")
- assert(object.test == true, "Failed to change the metatable")
- if objectReturned then
- return objectReturned == object and "Returned the original object" or "Did not return the original object"
- end
- end)
- test("setreadonly", {}, function()
- local object = { success = false }
- table.freeze(object)
- setreadonly(object, false)
- object.success = true
- assert(object.success, "Did not allow the table to be modified")
- end)
- -- Miscellaneous
- test("identifyexecutor", {"getexecutorname"}, function()
- local name, version = identifyexecutor()
- assert(type(name) == "string", "Did not return a string for the name")
- return type(version) == "string" and "Returns version as a string" or "Does not return version"
- end)
- test("lz4compress", {}, function()
- local raw = "Hello, world!"
- local compressed = lz4compress(raw)
- assert(type(compressed) == "string", "Compression did not return a string")
- assert(lz4decompress(compressed, #raw) == raw, "Decompression did not return the original string")
- end)
- test("lz4decompress", {}, function()
- local raw = "Hello, world!"
- local compressed = lz4compress(raw)
- assert(type(compressed) == "string", "Compression did not return a string")
- assert(lz4decompress(compressed, #raw) == raw, "Decompression did not return the original string")
- end)
- test("messagebox", {})
- test("queue_on_teleport", {"queueonteleport"})
- test("request", {"http.request", "http_request"}, function()
- local response = request({
- Url = "https://httpbin.org/user-agent",
- Method = "GET",
- })
- assert(type(response) == "table", "Response must be a table")
- assert(response.StatusCode == 200, "Did not return a 200 status code")
- local data = game:GetService("HttpService"):JSONDecode(response.Body)
- assert(type(data) == "table" and type(data["user-agent"]) == "string", "Did not return a table with a user-agent key")
- return "User-Agent: " .. data["user-agent"]
- end)
- test("setclipboard", {"toclipboard"})
- test("setfpscap", {}, function()
- local renderStepped = game:GetService("RunService").RenderStepped
- local function step()
- renderStepped:Wait()
- local sum = 0
- for _ = 1, 5 do
- sum += 1 / renderStepped:Wait()
- end
- return math.round(sum / 5)
- end
- setfpscap(60)
- local step60 = step()
- setfpscap(0)
- local step0 = step()
- return step60 .. "fps @60 • " .. step0 .. "fps @0"
- end)
- -- Scripts
- test("getgc", {}, function()
- local gc = getgc()
- assert(type(gc) == "table", "Did not return a table")
- assert(#gc > 0, "Did not return a table with any values")
- end)
- test("getgenv", {}, function()
- getgenv().__TEST_GLOBAL = true
- assert(__TEST_GLOBAL, "Failed to set a global variable")
- getgenv().__TEST_GLOBAL = nil
- end)
- test("getloadedmodules", {}, function()
- local modules = getloadedmodules()
- assert(type(modules) == "table", "Did not return a table")
- assert(#modules > 0, "Did not return a table with any values")
- assert(typeof(modules[1]) == "Instance", "First value is not an Instance")
- assert(modules[1]:IsA("ModuleScript"), "First value is not a ModuleScript")
- end)
- test("getrenv", {}, function()
- assert(_G ~= getrenv()._G, "The variable _G in the executor is identical to _G in the game")
- end)
- test("getrunningscripts", {}, function()
- local scripts = getrunningscripts()
- assert(type(scripts) == "table", "Did not return a table")
- assert(#scripts > 0, "Did not return a table with any values")
- assert(typeof(scripts[1]) == "Instance", "First value is not an Instance")
- assert(scripts[1]:IsA("ModuleScript") or scripts[1]:IsA("LocalScript"), "First value is not a ModuleScript or LocalScript")
- end)
- test("getscriptbytecode", {"dumpstring"}, function()
- local animate = game:GetService("Players").LocalPlayer.Character.Animate
- local bytecode = getscriptbytecode(animate)
- assert(type(bytecode) == "string", "Did not return a string for Character.Animate (a " .. animate.ClassName .. ")")
- end)
- test("getscripthash", {}, function()
- local animate = game:GetService("Players").LocalPlayer.Character.Animate:Clone()
- local hash = getscripthash(animate)
- local source = animate.Source
- animate.Source = "print('Hello, world!')"
- task.defer(function()
- animate.Source = source
- end)
- local newHash = getscripthash(animate)
- assert(hash ~= newHash, "Did not return a different hash for a modified script")
- assert(newHash == getscripthash(animate), "Did not return the same hash for a script with the same source")
- end)
- test("getscripts", {}, function()
- local scripts = getscripts()
- assert(type(scripts) == "table", "Did not return a table")
- assert(#scripts > 0, "Did not return a table with any values")
- assert(typeof(scripts[1]) == "Instance", "First value is not an Instance")
- assert(scripts[1]:IsA("ModuleScript") or scripts[1]:IsA("LocalScript"), "First value is not a ModuleScript or LocalScript")
- end)
- test("getsenv", {}, function()
- local animate = game:GetService("Players").LocalPlayer.Character.Animate
- local env = getsenv(animate)
- assert(type(env) == "table", "Did not return a table for Character.Animate (a " .. animate.ClassName .. ")")
- assert(env.script == animate, "The script global is not identical to Character.Animate")
- end)
- test("getthreadidentity", {"getidentity", "getthreadcontext"}, function()
- assert(type(getthreadidentity()) == "number", "Did not return a number")
- end)
- test("setthreadidentity", {"setidentity", "setthreadcontext"}, function()
- setthreadidentity(3)
- assert(getthreadidentity() == 3, "Did not set the thread identity")
- end)
- -- Drawing
- test("Drawing", {})
- test("Drawing.new", {}, function()
- local drawing = Drawing.new("Square")
- drawing.Visible = false
- local canDestroy = pcall(function()
- drawing:Destroy()
- end)
- assert(canDestroy, "Drawing:Destroy() should not throw an error")
- end)
- test("Drawing.Fonts", {}, function()
- assert(Drawing.Fonts.UI == 0, "Did not return the correct id for UI")
- assert(Drawing.Fonts.System == 1, "Did not return the correct id for System")
- assert(Drawing.Fonts.Plex == 2, "Did not return the correct id for Plex")
- assert(Drawing.Fonts.Monospace == 3, "Did not return the correct id for Monospace")
- end)
- test("isrenderobj", {}, function()
- local drawing = Drawing.new("Image")
- drawing.Visible = true
- assert(isrenderobj(drawing) == true, "Did not return true for an Image")
- assert(isrenderobj(newproxy()) == false, "Did not return false for a blank table")
- end)
- test("getrenderproperty", {}, function()
- local drawing = Drawing.new("Image")
- drawing.Visible = true
- assert(type(getrenderproperty(drawing, "Visible")) == "boolean", "Did not return a boolean value for Image.Visible")
- local success, result = pcall(function()
- return getrenderproperty(drawing, "Color")
- end)
- if not success or not result then
- return "Image.Color is not supported"
- end
- end)
- test("setrenderproperty", {}, function()
- local drawing = Drawing.new("Square")
- drawing.Visible = true
- setrenderproperty(drawing, "Visible", false)
- assert(drawing.Visible == false, "Did not set the value for Square.Visible")
- end)
- test("cleardrawcache", {}, function()
- cleardrawcache()
- end)
- -- WebSocket
- test("WebSocket", {})
- test("WebSocket.connect", {}, function()
- local types = {
- Send = "function",
- Close = "function",
- OnMessage = {"table", "userdata"},
- OnClose = {"table", "userdata"},
- }
- local ws = WebSocket.connect("ws://echo.websocket.events")
- assert(type(ws) == "table" or type(ws) == "userdata", "Did not return a table or userdata")
- for k, v in pairs(types) do
- if type(v) == "table" then
- assert(table.find(v, type(ws[k])), "Did not return a " .. table.concat(v, ", ") .. " for " .. k .. " (a " .. type(ws[k]) .. ")")
- else
- assert(type(ws[k]) == v, "Did not return a " .. v .. " for " .. k .. " (a " .. type(ws[k]) .. ")")
- end
- end
- ws:Close()
- end)
- ---------------
- printidentity()
Add Comment
Please, Sign In to add comment