Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Synapse Only
- -- Made by: Racist Dolphin#5199
- -- If only LuaSecure didn't break this script :(
- -- TODO:
- --[[
- + execfunc function -- Find a way to execute a function with arguemnts
- ]]
- local workspace = game:GetService("Workspace") -- lul
- local ps = game:GetService("Players")
- local i = game:GetService("UserInputService")
- local r = game:GetService("RunService")
- local cg = game:GetService("CoreGui")
- local sg = game:GetService("StarterGui")
- local p = ps.LocalPlayer
- local c = p.Character
- local mc = workspace:FindFirstChildOfClass("Camera")
- local mo = p:GetMouse()
- local b = p:FindFirstChild("Backpack") or p:WaitForChild("Backpack")
- local g = p:FindFirstChild("PlayerGui") or p:WaitForChild("PlayerGui")
- local m = getrawmetatable(game)
- make_writeable(m)
- local oldindex = m.__index
- local oldnamecall = m.__namecall
- local crap = {
- FE = workspace.FilteringEnabled,
- PID = game.PlaceId,
- CID = game.CreatorId,
- DEV_MODE = false,
- PRINT_HIJACKING = false,
- PRINT_ALL_TABLES = false,
- PRINT_ARGUMENTS = false,
- DECOMPILE_NEXT_HIJACK = false,
- HI_JACKING = "FindPartOnRay",
- HI_JACKING_FIND = nil,
- HI_JACK_TABLES = { },
- SET_TABLE = nil,
- REGISTRY_TABLES = { },
- COPY_TABLE = nil,
- SET_REGISTRY_TABLE = nil,
- UPVALS = { },
- LOCALS = { },
- LOOP_COMMANDS = { },
- FUNCTIONS = { },
- FUNCTIONS_BACKUP = { },
- DECOMPILED_SCRIPTS = { },
- COMMANDS = { },
- PLAYER_DATA = { },
- HACKS = {
- Godmode = false,
- ForceField = false,
- WalkSpeed = "DEFAULT",
- JumpPower = "DEFAULT",
- LoopKill = false,
- PARTS = { },
- CONNECTIONS = { },
- }
- }
- local HijackBaseScript = [==[
- -- Synapse Only
- -- Made by: Racist Dolphin#5199
- local ps = game:GetService("Players")
- local i = game:GetService("UserInputService")
- local r = game:GetService("RunService")
- local cg = game:GetService("CoreGui")
- local p = ps.LocalPlayer
- local c = p.Character
- local b = p:FindFirstChild("Backpack") or p:WaitForChild("Backpack")
- local mo = p:GetMouse()
- p.CharacterAdded:connect(function(char)
- c = char
- end)
- local m = getrawmetatable(game)
- make_writeable(m)
- local oldindex = m.__index
- local oldnamecall = m.__namecall
- m.__namecall = function(...)
- local t = {...}
- local method = t[#t]
- if method == "FindPartOnRay" then
- local env = getfenv(2)
- if env.script then
- if env.script.Parent ~= nil then
- -- PRINT DATA
- local upv = debug.getupvalues(2)
- local locals = debug.getlocals(2)
- for i = 0, 15 do
- print(" ")
- end
- print("UP VALUES:")
- for i, v in next, upv do
- warn(tostring(i), tostring(v))
- end
- print("LOCALS")
- for i, v in next, locals do
- warn(tostring(i), tostring(v))
- end
- -- WRITE DATA
- debug.setupvalue(2, PROP, VALUE)
- debug.setlocal(2, PROP, VALUE)
- end
- end
- end
- return oldnamecall(...)
- end]==]
- local regbase_script = [==[
- -- Synapse Only
- -- Made by: Racist Dolphin#5199
- local ps = game:GetService("Players")
- local i = game:GetService("UserInputService")
- local r = game:GetService("RunService")
- local cg = game:GetService("CoreGui")
- local p = ps.LocalPlayer
- local c = p.Character
- local b = p:FindFirstChild("Backpack") or p:WaitForChild("Backpack")
- local mo = p:GetMouse()
- p.CharacterAdded:connect(function(char)
- c = char
- end)
- local m = getrawmetatable(game)
- make_writeable(m)
- local oldindex = m.__index
- local oldnamecall = m.__namecall
- local table_tocopy = "network"
- _G.table_hax = nil
- _G.table_backup = nil
- repeat
- do
- for i, v in next, getreg() do
- if type(v) == "function" then
- local env = getfenv(2)
- if env.script then
- if env.script.Parent ~= nil then
- for i2, v2 in next, debug.getupvalues(v) do
- if tostring(i2) == table_tocopy then
- _G.table_hax = debug.getupvalue(v, table_tocopy)
- break
- end
- end
- end
- end
- end
- end
- end
- r.RenderStepped:wait()
- until _G.table_hax = nil
- print("Done.")
- ]==]
- function FindPlayer(Txt)
- local Players = { }
- if Txt == "me" then
- Players = { p }
- elseif Txt == "all" then
- Players = ps:GetPlayers()
- elseif Txt == "others" then
- for i, v in next, ps:GetPlayers() do
- if v ~= p then
- table.insert(Players, v)
- end
- end
- else
- for i, v in pairs(ps:GetPlayers()) do
- if string.lower(string.sub(v.Name, 1, string.len(Txt))) == string.lower(Txt) then
- table.insert(Players, v)
- end
- end
- end
- return Players
- end
- function WaitForChildOfClass(Par, ClassName)
- local t = tick()
- local Hum
- repeat
- Hum = Par:FindFirstChildOfClass("Humanoid")
- r.RenderStepped:wait()
- until Hum ~= nil or (tick() - t) > 5
- return Hum
- end
- function PrintTable(name, t)
- print("TABLE: " .. name)
- for i, v in next, t do
- warn(tostring(i), tostring(v))
- if type(v) == "table" then
- PrintTable(i, v)
- end
- end
- end
- function CloneTable(t) -- http://lua-users.org/wiki/CopyTable
- local orig_type = type(t)
- local copy
- if orig_type == 'table' then
- copy = {}
- for orig_key, orig_value in next, t, nil do
- copy[CloneTable(orig_key)] = CloneTable(orig_value)
- end
- setmetatable(copy, CloneTable(getmetatable(t)))
- else -- number, string, boolean, etc
- copy = t
- end
- return copy
- end
- function DecompileFix(script)
- Synapse:WriteFile(script.Name .. ".lua", Synapse:Decompile(script))
- end
- function onCharAdeded(Char)
- local Plr = ps:GetPlayerFromCharacter(Char)
- if Plr == nil then return end
- local Hum = Char:FindFirstChildOfClass("Humanoid") or WaitForChildOfClass(Char, "Humanoid")
- local Tor = Char:FindFirstChild("HumanoidRootPart") or Char:WaitForChild("HumanoidRootPart")
- local data = crap.PLAYER_DATA[Plr]
- local data_parts = data.PARTS
- local data_connections = data.CONNECTIONS
- if data.Godmode and Hum ~= nil then
- Hum.MaxHealth = math.huge
- Hum.Health = Hum.MaxHealth
- end
- if data.ForceField then
- if not Char:FindFirstChild("AdminFF") then
- data_parts.ForceField = Instance.new("ForceField")
- data_parts.ForceField.RobloxLocked = true
- data_parts.ForceField.Name = "AdminFF"
- data_parts.ForceField.Parent = Char
- end
- end
- if type(data.WalkSpeed) == "number" and Hum ~= nil then
- Hum.WalkSpeed = data.WalkSpeed
- end
- if type(data.JumpPower) == "number" and Hum ~= nil then
- Hum.JumpPower = data.JumpPower
- end
- if data.LoopKill then
- Char:BreakJoints()
- end
- end
- function CreatePlayerData(Plr)
- if crap.PLAYER_DATA[Plr] ~= nil then return end
- crap.PLAYER_DATA[Plr] = { }
- for i, v in next, crap.HACKS do
- crap.PLAYER_DATA[Plr][i] = crap.HACKS[i]
- end
- Plr.CharacterAdded:connect(onCharAdeded)
- end
- function RemovePlayerData(Plr)
- if crap.PLAYER_DATA[Plr] == nil then return end
- local n = 1
- for i, v in next, crap.PLAYER_DATA do
- if i == Plr then
- table.remove(crap.PLAYER_DATA, n)
- end
- n = n + 1
- end
- end
- function AddCommand(CMD, Command, Info, Func, FEReq)
- if crap.COMMANDS[CMD] ~= nil then return end
- crap.COMMANDS[CMD] = { }
- local c = crap.COMMANDS[CMD]
- c.Command = Command
- c.Info = Info
- c.Func = Func
- c.FEReq = FEReq
- end
- function InitGui()
- -- Objects
- local console = Instance.new("ScreenGui")
- local output = Instance.new("ScrollingFrame")
- local _temp = Instance.new("TextLabel")
- local input = Instance.new("TextBox")
- local cover = Instance.new("Frame")
- -- Properties
- console.Name = "console"
- console.Parent = cg
- console.DisplayOrder = 1
- output.Name = "output"
- output.Parent = console
- output.BackgroundColor3 = Color3.new(0.172549, 0.172549, 0.172549)
- output.BorderColor3 = Color3.new(1, 1, 1)
- output.Size = UDim2.new(1, 0, 0.200000003, 0)
- output.CanvasSize = UDim2.new(0, 0, 50, 0)
- output.CanvasPosition = Vector2.new(0, 50000)
- output.HorizontalScrollBarInset = Enum.ScrollBarInset.Always
- --[[_temp.Name = "_temp"
- _temp.Parent = output
- _temp.BackgroundColor3 = Color3.new(1, 1, 1)
- _temp.BackgroundTransparency = 1
- _temp.Position = UDim2.new(0, 4, 0, 0)
- _temp.Size = UDim2.new(1, 0, 0, 14)
- _temp.ZIndex = 2
- _temp.Font = Enum.Font.Code
- _temp.Text = "-- sample text"
- _temp.TextColor3 = Color3.new(1, 1, 1)
- _temp.TextSize = 14
- _temp.TextStrokeTransparency = 0.80000001192093
- _temp.TextXAlignment = Enum.TextXAlignment.Left
- _temp.TextYAlignment = Enum.TextYAlignment.Top]]
- input.Name = "input"
- input.Parent = console
- input.BackgroundColor3 = Color3.new(0.172549, 0.172549, 0.172549)
- input.BorderColor3 = Color3.new(1, 1, 1)
- input.Position = UDim2.new(0, 0, 0.200000003, 0)
- input.Size = UDim2.new(1, 0, 0, 30)
- input.ClearTextOnFocus = true
- input.Font = Enum.Font.Code
- input.Text = "Click Here, or Press the \".\" Key to Enter a Command."
- input.TextColor3 = Color3.new(1, 0.980392, 0.313726)
- input.TextSize = 14
- input.TextXAlignment = Enum.TextXAlignment.Left
- cover.Name = "cover"
- cover.Parent = console
- cover.BackgroundColor3 = Color3.new(0.172549, 0.172549, 0.172549)
- cover.BorderSizePixel = 0
- cover.Position = UDim2.new(0, 0, 0, -32)
- cover.Size = UDim2.new(1, 0, 0, 33)
- local function MoveStrings()
- for i, v in next, output:GetChildren() do
- v.Position = v.Position - UDim2.new(0, 0, 0, 14)
- end
- end
- local function Output(Text, Color)
- MoveStrings()
- if Color == nil then Color = Color3.new(1, 1, 1) end
- local Txt = Instance.new("TextLabel")
- Txt.Name = "1_temp"
- Txt.BackgroundColor3 = Color3.new(1, 1, 1)
- Txt.BackgroundTransparency = 1
- Txt.Position = UDim2.new(0, 4, 1, -30)
- Txt.Size = UDim2.new(1, 0, 0, 14)
- Txt.ZIndex = 2
- Txt.Font = Enum.Font.Code
- Txt.Text = Text
- Txt.TextColor3 = Color
- Txt.TextSize = 14
- Txt.TextStrokeTransparency = 0.80000001192093
- Txt.TextXAlignment = Enum.TextXAlignment.Left
- Txt.TextYAlignment = Enum.TextYAlignment.Top
- Txt.Parent= output
- end
- function RunCommand(Str)
- local CMD = string.find(Str, " ")
- if CMD then
- CMD = string.sub(Str, 1, (CMD - 1))
- else
- CMD = Str
- end
- CMD = string.lower(CMD)
- if crap.COMMANDS[CMD] == nil then return Output("Command not found!", Color3.new(1, 0, 0)) end
- if crap.COMMANDS[CMD].FEReq == true and crap.FE == true then return Output("Command doesn't work with FilteringEnabled!", Color3.new(1, 0, 0)) end
- local Args = { }
- local Pattern = "%s+(%w+)"
- for i in Str:gmatch(Pattern) do
- table.insert(Args, i)
- end
- crap.COMMANDS[CMD].Func(unpack(Args))
- end
- AddCommand("god", "god [PLAYER]", "Toggle x Player's Godmode.", function(Plr)
- Plr = FindPlayer(Plr)
- if Plr ~= nil then
- for _, v in next, Plr do
- local GetChar = v.Character
- if GetChar then
- local GetHum = GetChar:FindFirstChildOfClass("Humanoid")
- if GetHum then
- crap.PLAYER_DATA[v].Godmode = not crap.PLAYER_DATA[v].Godmode
- if crap.PLAYER_DATA[v].Godmode then
- GetHum.MaxHealth = math.huge
- GetHum.Health = GetHum.MaxHealth
- Output("Gave " .. v.Name .. " godmode.")
- else
- GetHum.MaxHealth = 100
- GetHum.Health = GetHum.MaxHealth
- Output("Removed " .. v.Name .. " godmode.")
- end
- end
- end
- end
- end
- end, true)
- AddCommand("ungod", "ungod [PLAYER]", "UnGod x Player.", function(Plr)
- Plr = FindPlayer(Plr)
- if Plr ~= nil then
- for _, v in next, Plr do
- local GetChar = v.Character
- if GetChar then
- local GetHum = GetChar:FindFirstChildOfClass("Humanoid")
- if GetHum then
- crap.PLAYER_DATA[v].Godmode = false
- GetHum.MaxHealth = 100
- GetHum.Health = GetHum.MaxHealth
- Output("Removed " .. v.Name .. "'s' godmode.")
- end
- end
- end
- end
- end, true)
- AddCommand("ff", "ff [player]", "Give x player a ForceField", function(Plr)
- Plr = FindPlayer(Plr)
- if Plr ~= nil then
- for _, v in next, Plr do
- local GetChar = v.Character
- if GetChar then
- if crap.PLAYER_DATA[v].PARTS.ForceField == nil then
- crap.PLAYER_DATA[v].PARTS.ForceField = Instance.new("ForceField")
- crap.PLAYER_DATA[v].PARTS.ForceField.Name = "AdminFF"
- crap.PLAYER_DATA[v].PARTS.ForceField.Parent = GetChar
- Output("Gave " .. v.Name .. " a ForceField.")
- end
- end
- for i, v in next, crap.PLAYER_DATA[v].PARTS do
- print(i, v)
- end
- end
- end
- end, true)
- AddCommand("unff", "unff [player]", "Remove x player's ForceField.", function(Plr)
- Plr = FindPlayer(Plr)
- if Plr ~= nil then
- for _, v in next, Plr do
- local GetChar = v.Character
- if GetChar then
- if crap.PLAYER_DATA[v].PARTS.ForceField ~= nil then
- crap.PLAYER_DATA[v].PARTS.ForceField:Destroy()
- crap.PLAYER_DATA[v].PARTS.ForceField = nil
- Output("Removed " .. v.Name .. "'s ForceField.")
- end
- end
- end
- end
- end, true)
- --ff command
- --unff command
- AddCommand("ws", "ws [player] [num]", "Give x player x WalkSpeed. (Num can be DEFAULT)", function(Plr, Num)
- Plr = FindPlayer(Plr)
- Num = tonumber(Num) or 16
- if Plr ~= nil then
- for _, v in next, Plr do
- local GetChar = v.Character
- if GetChar then
- local GetHum = GetChar:FindFirstChildOfClass("Humanoid")
- if GetHum then
- crap.PLAYER_DATA[v].WalkSpeed = Num
- GetHum.WalkSpeed = Num
- Output("Set " .. v.Name .. "'s WalkSpeed to: " .. Num)
- end
- end
- end
- end
- end, false)
- AddCommand("jp", "jp [player] [num]", "Give x player x JumpPower. (Num can be DEFAULT)", function(Plr, Num)
- Plr = FindPlayer(Plr)
- Num = tonumber(Num) or 50
- if Plr ~= nil then
- for _, v in next, Plr do
- local GetChar = v.Character
- if GetChar then
- local GetHum = GetChar:FindFirstChildOfClass("Humanoid")
- if GetHum then
- crap.PLAYER_DATA[v].JumpPower = Num
- GetHum.JumpPower = Num
- Output("Set " .. v.Name .. "'s JumpPower to: " .. Num)
- end
- end
- end
- end
- end, false)
- -- DEVELOPER COMMANDS
- AddCommand("devmode", "devmode", "Toggle Developer Mode.", function()
- crap.DEV_MODE = not crap.DEV_MODE
- if crap.DEV_MODE then
- Output("Developer Mode: ENABLED", Color3.new(0, 1, 0))
- else
- Output("Developer Mode: DISABLED", Color3.new(1, 0, 0))
- end
- end, false)
- AddCommand("loopcmd", "loopcmd [command] [args]", "Loop a command with x arguments.", function(...)
- local command = table.concat({...}, " ")
- crap.LOOP_COMMANDS[#crap.LOOP_COMMANDS + 1] = command
- Output("Looping command: " .. command)
- end, false)
- AddCommand("clearloops", "clearloops", "Clear all looped commands.", function()
- for i, v in next, crap.LOOP_COMMANDS do
- table.remove(crap.LOOP_COMMANDS, i)
- end
- end)
- -- HI-JACKING COMMANDS
- AddCommand("hijack", "hijack [method] [find]", "Hi-Jack a Metamethod (Default FindPartOnRay)", function(method, find)
- crap.HI_JACKING = method
- crap.HI_JACKING_FIND = find
- Output("Set Hi-Jacking to: " .. method)
- end, false)
- AddCommand("printhijack", "printhijack", "Print all up-values, and locals.", function()
- crap.PRINT_HIJACKING = not crap.PRINT_HIJACKING
- Output("Command ran successfully!")
- end, false)
- AddCommand("printalltables", "printalltables", "Print all tables in up-values, and locals.", function()
- crap.PRINT_ALL_TABLES = not crap.PRINT_ALL_TABLES
- Output("Command ran successfully!")
- end, false)
- AddCommand("newtable", "newtable [table]", "Create a new table.", function(table)
- crap.HI_JACK_TABLES[table] = { }
- Output("Created table: " .. table)
- end, false)
- AddCommand("copytable", "copytable [table]", "No Information.", function(table)
- crap.COPY_TABLE = table
- Output("Will copy table: " .. table)
- end, false)
- AddCommand("settable", "settable [table]", "No Information.", function(table)
- if crap.SET_TABLE == nil then
- if crap.HI_JACK_TABLES[tonumber(table) or table] ~= nil then
- crap.SET_TABLE = crap.HI_JACK_TABLES[tonumber(table) or table]
- end
- else
- crap.SET_TABLE = crap.SET_TABLE[tonumber(table) or table]
- end
- Output("Command ran successfully!")
- end, false)
- AddCommand("edittable", "edittable [prop] [value]", "No Information.", function(prop, newval, ...)
- if crap.SET_TABLE == nil then return Output("ERROR: Must set the table first!", Color3.new(1, 0, 0)) end
- if newval == "true" or newval == "false" then
- crap.SET_TABLE[tonumber(prop) or prop] = (newval == "true" and true or false)
- else
- crap.SET_TABLE[tonumber(prop) or prop] = tonumber(newval) or newval .. " " .. table.concat({...}, " ")
- end
- Output("Command ran successfully!")
- end, false)
- AddCommand("printtable", "printtable [table]", "No Information.", function(table)
- if crap.HI_JACK_TABLES[table] ~= nil then
- PrintTable(table, crap.HI_JACK_TABLES[table])
- Output("Printed table: " .. table)
- end
- end, false)
- AddCommand("printargs", "printargs", "No Information.", function()
- crap.PRINT_ARGUMENTS = not crap.PRINT_ARGUMENTS
- Output("Command ran successfully!")
- end, false)
- AddCommand("setupval", "setupval [prop] [newval] [table]", "No Information.", function(prop, newval, table)
- if table == nil then
- if newval == "true" or newval == "false" then
- crap.UPVALS[prop] = (newval == "true" and true or false)
- elseif tonumber(newval) then
- crap.UPVALS[prop] = tonumber(newval)
- else
- crap.UPVALS[prop] = newval
- end
- else
- if crap.HI_JACK_TABLES[table] ~= nil then
- crap.UPVALS[prop] = crap.HI_JACK_TABLES[table]
- end
- end
- Output("Command ran successfully!")
- end, false)
- AddCommand("setlocal", "setlocal [prop] [newval] [table]", "No Information.", function(prop, newval, table)
- if table == nil then
- if newval == "true" or newval == "false" then
- crap.LOCALS[prop] = (newval == "true" and true or false)
- elseif tonumber(newval) then
- crap.LOCALS[prop] = tonumber(newval)
- else
- crap.LOCALS[prop] = newval
- end
- else
- if crap.HI_JACK_TABLES[table] ~= nil then
- crap.LOCALS[prop] = crap.HI_JACK_TABLES[table]
- end
- end
- Output("Command ran successfully!")
- end, false)
- AddCommand("decompilehijack", "decompilehijack", "No Information.", function()
- crap.DECOMPILE_NEXT_HIJACK = true
- end, false)
- AddCommand("copybasescript", "copybasescript", "Copy a hi-jack base script.", function()
- Synapse:CopyString(HijackBaseScript)
- end, false)
- -- REGISTRY COMMANDS
- AddCommand("printreg", "printreg [script]", "Print registry of x script.", function(name)
- name = string.lower(name)
- for i = 0, 25 do
- print(" ")
- end
- for i, v in next, getreg() do
- if type(v) == "function" then
- local env = getfenv(v)
- if env.script then
- if env.script.Parent ~= nil then
- if string.lower(tostring(env.script)) == name then
- for i2, v2 in next, debug.getupvalues(v) do
- warn(i2, v2)
- end
- end
- end
- end
- end
- end
- Output("Command ran successfully!")
- end, false)
- AddCommand("printregtable", "printregtable [script] [table]", "Print table in registry.", function(name, table)
- name = string.lower(name)
- for i = 0, 25 do
- print(" ")
- end
- print("TABLE: " .. table)
- for i, v in next, getreg() do
- if type(v) == "function" then
- local env = getfenv(v)
- if env.script then
- if env.script.Parent ~= nil then
- if string.lower(tostring(env.script)) == name then
- for i2, v2 in next, debug.getupvalues(v) do
- if type(v2) == "table" and i2 == table then
- PrintTable(i2, v2)
- end
- end
- end
- end
- end
- end
- end
- Output("Command ran successfully!")
- end, false)
- AddCommand("setreg", "setreg [script] [prop] [value]", "No Information.", function(name, prop, newval, ...)
- name = string.lower(name)
- for i, v in next, getreg() do
- if type(v) == "function" then
- local env = getfenv(v)
- if env.script then
- if env.script.Parent ~= nil then
- if string.lower(tostring(env.script)) == name then
- for i2, v2 in next, debug.getupvalues(v) do
- if i2 == prop then
- if newval == "true" or newval == "false" then
- debug.setupvalue(v, prop, (newval == "true" and true or false))
- else
- if #{...} >= 1 then
- debug.setupvalue(v, prop, newval .. " " .. table.concat({...}, " "))
- else
- debug.setupvalue(v, prop, tonumber(newval) or newval)
- end
- end
- end
- end
- end
- end
- end
- end
- end
- Output("Command ran successfully!")
- end, false)
- AddCommand("copyregtable", "copyregtable [script] [table]", "No Information.", function(name, table)
- name = string.lower(name)
- for i, v in next, getreg() do
- if type(v) == "function" then
- local env = getfenv(v)
- if env.script then
- if env.script.Parent ~= nil then
- if string.lower(tostring(env.script)) == name then
- for i2, v2 in next, debug.getupvalues(v) do
- if i2 == table and type(v2) == "table" then
- crap.REGISTRY_TABLES[i2] = debug.getupvalue(v, i2)
- Output("Table copied successfully!", Color3.new(0, 1, 0))
- end
- end
- end
- end
- end
- end
- end
- end, false)
- AddCommand("setregtable", "setregtable [table]", "Sets the current registry table.", function(table)
- if crap.SET_REGISTRY_TABLE == nil then
- if crap.REGISTRY_TABLES[tonumber(table) or table] ~= nil then
- crap.SET_REGISTRY_TABLE = crap.REGISTRY_TABLES[tonumber(table) or table]
- end
- else
- crap.SET_REGISTRY_TABLE = crap.SET_REGISTRY_TABLE[tonumber(table) or table]
- end
- end, false)
- AddCommand("findregvalue", "findregvalue [value]", "Find all registry with value.", function(val)
- for i, v in next, getreg() do
- if type(v) == "function" then
- local env = getfenv(v)
- if env.script then
- if env.script.Parent ~= nil then
- for i2, v2 in next, debug.getupvalues(v) do
- if tostring(v2) == val then
- Output("Found: " .. i2 .. ": " .. v2 .. " SCRIPT: " .. env.script:GetFullName(), Color3.new(0, 1, 0))
- end
- end
- end
- end
- end
- end
- end, false)
- AddCommand("viewregtable", "viewregtable [table]", "No Information.", function(table)
- if crap.REGISTRY_TABLES[tonumber(table) or table] ~= nil then
- PrintTable(table, crap.REGISTRY_TABLES[tonumber(table) or table])
- Output("Printed table: " .. table)
- end
- end, false)
- AddCommand("hijackfunc", "hijackfunc [script] [func]", "Hi-Jack x function in x script.", function(name, func)
- name = string.lower(name)
- for i, v in next, getreg() do
- if type(v) == "function" then
- local env = getfenv(v)
- if env.script then
- if env.script.Parent ~= nil then
- if string.lower(tostring(env.script)) == name then
- for i2, v2 in next, debug.getupvalues(v) do
- if i2 == func and type(v2) == "function" then
- crap.FUNCTIONS[i2] = {v, debug.getupvalue(v, func)}
- crap.FUNCTIONS_BACKUP[i2] = debug.getupvalue(v, func)
- end
- end
- end
- end
- end
- end
- end
- for i, v in next, crap.FUNCTIONS do
- crap.FUNCTIONS[i][2] = function(...)
- print("FUNCTION: " .. i .. " CALLED.")
- for i2, v2 in next, {...} do
- warn(i2, v2)
- end
- return crap.FUNCTIONS_BACKUP[i](...)
- end
- debug.setupvalue(crap.FUNCTIONS[i][1], i, crap.FUNCTIONS[i][2])
- end
- Output("Command ran successfully!")
- end, false)
- AddCommand("hijacktablefunc", "hijacktablefunc [func]", "No Information.", function(func)
- if crap.SET_REGISTRY_TABLE == nil then return Output("ERROR: Must set the registry table first!", Color3.new(1, 0, 0)) end
- if type(crap.SET_REGISTRY_TABLE[func]) == "function" then
- crap.FUNCTIONS_BACKUP[func] = crap.SET_REGISTRY_TABLE[func]
- crap.SET_REGISTRY_TABLE[func] = function(...)
- print("FUNCTION: " .. func .. " CALLED!")
- for i, v in next, {...} do
- warn(tostring(i), tostring(v))
- end
- end
- end
- end, false)
- AddCommand("execfunc", "execfunc [script] [func] [args]", "Execute a function NOT in a table.", function(name, func, ...)
- name = string.lower(name)
- local args = {...} or {nil}
- if args[1] ~= nil then
- for i, v in next, args do
- if tostring(v) == "true" or tostring(v) == "false" then
- v = tostring(v) == "true" and true or false
- else
- v = tonumber(v) or v
- end
- end
- end
- for i, v in next, getreg() do
- if type(v) == "function" then
- local env = getfenv(v)
- if env.script then
- if env.script.Parent ~= nil then
- if string.lower(tostring(env.script)) == name then
- for i2, v2 in next, debug.getupvalues(v) do
- if i2 == func and type(v2) == "function" then
- v2(unpack(args))
- end
- end
- end
- end
- end
- end
- end
- Output("Command ran successfully!")
- end, false)
- AddCommand("exectablefunc", "exectablefunc [func] [args]", "Execute a function in a table you copied.", function(func, ...)
- local args = {...} or {nil}
- if args[1] ~= nil then
- for i, v in next, args do
- if tostring(v) == "true" or tostring(v) == "false" then
- v = tostring(v) == "true" and true or false
- else
- v = tonumber(v) or v
- end
- end
- end
- if crap.SET_REGISTRY_TABLE ~= nil then
- if crap.SET_REGISTRY_TABLE[func] ~= nil then
- crap.SET_REGISTRY_TABLE[func](crap.SET_REGISTRY_TABLE, unpack(args))
- else
- Output("ERROR: Function doesn't exist!", Color3.new(1, 0, 0))
- end
- else
- return Output("ERROR: Must set the table first!", Color3.new(1, 0, 0))
- end
- end, false)
- AddCommand("unhijacktablefunc", "unhijacktablefunc [func]", "No Information.", function(func)
- if crap.SET_REGISTRY_TABLE == nil then return Output("ERROR: Must set the registry table first!", Color3.new(1, 0, 0)) end
- if crap.FUNCTIONS_BACKUP[func] == nil then return Output("ERROR: That function was never hi-jacked!", Color3.new(1, 0, 0)) end
- crap.SET_REGISTRY_TABLE[func] = crap.FUNCTIONS_BACKUP[func]
- Output("Command ran successfully!")
- end, false)
- AddCommand("clearfunchijacks", "clearfunchijacks", "Clear all function hi-jacks.", function(func)
- for i, v in next, crap.FUNCTIONS do
- debug.setupvalue(crap.FUNCTIONS[i][1], i, crap.FUNCTIONS_BACKUP[i])
- end
- Output("Command ran successfully!")
- end, false)
- AddCommand("copyregbasescript", "copyregbasescript", "Copy a registry hi-jacking base script.", function()
- Synapse:CopyString(regbase_script)
- end)
- -- MENU COMMANDS
- AddCommand("clear", "clear", "Clear the console.", function()
- output:ClearAllChildren()
- end, false)
- AddCommand("help", "help", "", function()
- for i, v in next, crap.COMMANDS do
- Output(v.Command .. " <--" .. v.Info)
- end
- end, false)
- input.FocusLost:connect(function()
- Output("> " .. input.Text)
- RunCommand(input.Text)
- input.Text = "Click Here, or Press the \".\" Key to Enter a Command."
- end)
- i.InputBegan:connect(function(inp, ingui)
- if not ingui then
- if inp.UserInputType == Enum.UserInputType.Keyboard then
- if inp.KeyCode == Enum.KeyCode.F4 then
- output.Visible = not output.Visible
- cover.Visible = not cover.Visible
- input.Visible = not input.Visible
- end
- if inp.KeyCode == Enum.KeyCode.Period then
- input:CaptureFocus()
- end
- end
- end
- end)
- r:BindToRenderStep("Hi-Jack", 1000, function()
- for i, v in next, crap.LOOP_COMMANDS do
- RunCommand(v)
- end
- if crap.DECOMPILE_SCRIPT ~= nil then
- Synapse:WriteFile(crap.DECOMPILE_SCRIPT.Name .. ".lua", Synapse:Decompile(crap.DECOMPILE_SCRIPT))
- crap.DECOMPILED_SCRIPTS[crap.DECOMPILE_SCRIPT] = crap.DECOMPILE_SCRIPT
- crap.DECOMPILE_SCRIPT = nil
- end
- end)
- Output("This console is currently in very early development! More commands will be added!", Color3.new(0, 1, 0))
- Output("PRESS F4 TO TOGGLE THE GUI!", Color3.new(0, 1, 0))
- Output("Version: 0.8 (Added several new commands. (Check my YOUTUBE channel)) Enter command help for more details.", Color3.new(0, 1, 1))
- Output("Made by: Racist Dolphin#5199", Color3.new(0, 1, 0))
- if crap.FE then
- Output("FilteringEnabled DETECTED!", Color3.new(1, 0, 0))
- end
- end
- function Init()
- ps.PlayerAdded:connect(CreatePlayerData)
- ps.PlayerRemoving:connect(RemovePlayerData)
- for i, v in pairs(ps:GetPlayers()) do
- CreatePlayerData(v)
- end
- InitGui()
- end
- Init()
- m.__namecall = function(...)
- local t = {...}
- local method = t[#t]
- if crap.DEV_MODE then
- if method == crap.HI_JACKING then
- local env = getfenv(2)
- if env.script then
- if env.script.Parent ~= nil then
- if crap.DECOMPILE_NEXT_HIJACK then
- if crap.DECOMPILED_SCRIPTS[env.script] == nil then
- crap.DECOMPILE_SCRIPT = env.script
- Output("DECOMPILED SCRIPT: " .. tostring(env.script))
- end
- end
- if crap.PRINT_ARGUMENTS then
- print(method .. "'s arguments:")
- for i, v in next, t do
- warn(i, v)
- end
- end
- if crap.HI_JACKING_FIND ~= nil then
- local found = false
- for i, v in next, t do
- if tostring(v) == crap.HI_JACKING_FIND then
- found = true
- break
- end
- end
- if not found then return oldnamecall(...) end
- end
- if crap.PRINT_HIJACKING then
- for i = 0, 15 do
- print(" ")
- end
- local upv = debug.getupvalues(2)
- local locals = debug.getlocals(2)
- print("SCRIPT: " .. env.script:GetFullName())
- print(" ")
- print("UP VALUES: ")
- for i, v in next, upv do
- warn(i, v)
- if type(v) == "table" and crap.PRINT_ALL_TABLES then
- PrintTable(i, v)
- if i == crap.COPY_TABLE then
- crap.HI_JACK_TABLES[i] = CloneTable(v)
- crap.COPY_TABLE = nil
- end
- end
- end
- print("LOCALS: ")
- for i, v in next, locals do
- warn(i, v)
- if type(v) == "table" and crap.PRINT_ALL_TABLES then
- PrintTable(i, v)
- if i == crap.COPY_TABLE then
- crap.HI_JACK_TABLES[i] = CloneTable(v)
- crap.COPY_TABLE = nil
- end
- end
- end
- end
- -- WRITE DATA
- for i, v in next, crap.UPVALS do
- if debug.getupvalue(2, i) ~= nil then
- debug.setupvalue(2, i, v)
- end
- end
- for i, v in next, crap.LOCALS do
- if debug.getlocal(2, i) ~= nil then
- debug.setlocal(2, i, v)
- end
- end
- end
- end
- end
- end
- return oldnamecall(...)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement