Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local player = game.Players.LocalPlayer
- local uis = game:GetService("UserInputService")
- local Editor = Instance.new("ScreenGui")
- local Main = Instance.new("Frame")
- local Container = Instance.new("ScrollingFrame")
- local LineNum = Instance.new("TextLabel")
- local Source = Instance.new("TextBox")
- local Keywords = Instance.new("TextLabel")
- local Env = Instance.new("TextLabel")
- local Strings = Instance.new("TextLabel")
- local Tokens = Instance.new("TextLabel")
- local Vars = Instance.new("TextLabel")
- local Funcs = Instance.new("TextLabel")
- local Nums = Instance.new("TextLabel")
- local Comments = Instance.new("TextLabel")
- local Methods = Instance.new("TextLabel")
- local Title = Instance.new("TextButton")
- local Execute = Instance.new("TextButton")
- local Clear = Instance.new("TextButton")
- local LoadSource = Instance.new("TextButton")
- local Copy = Instance.new("TextButton")
- local Scripts = Instance.new("ScrollingFrame")
- Editor.Name = "ScriptEditor"
- Editor.Parent = player.PlayerGui
- Main.Name = "Main"
- Main.Parent = Editor
- Main.BackgroundColor3 = Color3.new(0.176471, 0.176471, 0.176471)
- Main.BorderColor3 = Color3.new(0, 0, 0)
- Main.BorderSizePixel = 0
- Main.AnchorPoint = Vector2.new(0.5,0.5)
- Main.Position = UDim2.new(0.4,0,0.5,0)
- Main.Size = UDim2.new(0, 675, 0, 371)
- Container.Name = "Container"
- Container.Parent = Main
- Container.BackgroundColor3 = Color3.new(1, 1, 1)
- Container.BackgroundTransparency = 1
- Container.BorderColor3 = Color3.new(0, 0, 0)
- Container.BorderSizePixel = 0
- Container.Size = UDim2.new(1, 0, 1, 0)
- Container.ZIndex = 91911
- LineNum.Name = "LineNum"
- LineNum.Parent = Container
- LineNum.BackgroundColor3 = Color3.new(1, 1, 1)
- LineNum.BackgroundTransparency = 1
- LineNum.Size = UDim2.new(0, 25, 1, 0)
- LineNum.Font = Enum.Font.Cartoon
- LineNum.Text = "1"
- LineNum.TextColor3 = Color3.new(1, 1, 1)
- LineNum.TextSize = 20
- LineNum.TextYAlignment = Enum.TextYAlignment.Top
- Source.Name = "Source"
- Source.Parent = Container
- Source.BackgroundColor3 = Color3.new(1, 1, 1)
- Source.BackgroundTransparency = 1
- Source.Position = UDim2.new(0.03, 0, 0, 0)
- Source.Size = UDim2.new(0.939999998, 0, 2, 0)
- Source.ClearTextOnFocus = false
- Source.Font = Enum.Font.Code
- Source.MultiLine = true
- Source.PlaceholderColor3 = Color3.new(0.603922, 0.603922, 0.603922)
- Source.Text = "print(\"Check dev console for info\")"
- Source.TextColor3 = Color3.new(0.603922, 0.603922, 0.603922)
- Source.TextSize = 20
- Source.TextXAlignment = Enum.TextXAlignment.Left
- Source.TextYAlignment = Enum.TextYAlignment.Top
- Keywords.Name = "Keywords"
- Keywords.Parent = Source
- Keywords.BackgroundColor3 = Color3.new(1, 1, 1)
- Keywords.BackgroundTransparency = 1
- Keywords.Size = UDim2.new(1, 0, 1, 0)
- Keywords.Font = Enum.Font.Code
- Keywords.Text = ""
- Keywords.TextColor3 = Color3.fromRGB(255,255,255)
- Keywords.TextSize = 20
- Keywords.TextStrokeColor3 = Color3.new(0.0470588, 0.301961, 1)
- Keywords.TextXAlignment = Enum.TextXAlignment.Left
- Keywords.TextYAlignment = Enum.TextYAlignment.Top
- Env.Name = "Env"
- Env.Parent = Source
- Env.BackgroundColor3 = Color3.new(1, 1, 1)
- Env.BackgroundTransparency = 1
- Env.Size = UDim2.new(1, 0, 1, 0)
- Env.Font = Enum.Font.Code
- Env.Text = ""
- Env.TextColor3 = Color3.fromRGB(255,255,255)
- Env.TextSize = 20
- Env.TextStrokeColor3 = Color3.new(0.0470588, 0.301961, 1)
- Env.TextXAlignment = Enum.TextXAlignment.Left
- Env.TextYAlignment = Enum.TextYAlignment.Top
- Strings.Name = "Strings"
- Strings.Parent = Source
- Strings.BackgroundColor3 = Color3.new(1, 1, 1)
- Strings.BackgroundTransparency = 1
- Strings.Size = UDim2.new(1, 0, 1, 0)
- Strings.Font = Enum.Font.Code
- Strings.Text = ""
- Strings.TextColor3 = Color3.fromRGB(255,255,255)
- Strings.TextSize = 20
- Strings.TextStrokeColor3 = Color3.new(0.0470588, 0.301961, 1)
- Strings.TextXAlignment = Enum.TextXAlignment.Left
- Strings.TextYAlignment = Enum.TextYAlignment.Top
- Tokens.Name = "Tokens"
- Tokens.Parent = Source
- Tokens.BackgroundColor3 = Color3.new(1, 1, 1)
- Tokens.BackgroundTransparency = 1
- Tokens.Size = UDim2.new(1, 0, 1, 0)
- Tokens.Font = Enum.Font.Code
- Tokens.Text = ""
- Tokens.TextColor3 = Color3.fromRGB(255,255,255)
- Tokens.TextSize = 20
- Tokens.TextStrokeColor3 = Color3.new(0.0470588, 0.301961, 1)
- Tokens.TextXAlignment = Enum.TextXAlignment.Left
- Tokens.TextYAlignment = Enum.TextYAlignment.Top
- Vars.Name = "Vars"
- Vars.Parent = Source
- Vars.BackgroundColor3 = Color3.new(1, 1, 1)
- Vars.BackgroundTransparency = 1
- Vars.Size = UDim2.new(1, 0, 1, 0)
- Vars.ZIndex = 2
- Vars.Font = Enum.Font.Code
- Vars.Text = ""
- Vars.TextColor3 = Color3.fromRGB(255,255,255)
- Vars.TextSize = 20
- Vars.TextStrokeColor3 = Color3.new(0.0470588, 0.301961, 1)
- Vars.TextXAlignment = Enum.TextXAlignment.Left
- Vars.TextYAlignment = Enum.TextYAlignment.Top
- Funcs.Name = "Funcs"
- Funcs.Parent = Source
- Funcs.BackgroundColor3 = Color3.new(1, 1, 1)
- Funcs.BackgroundTransparency = 1
- Funcs.Size = UDim2.new(1, 0, 1, 0)
- Funcs.ZIndex = 3
- Funcs.Font = Enum.Font.Code
- Funcs.Text = ""
- Funcs.TextColor3 = Color3.fromRGB(255,255,255)
- Funcs.TextSize = 20
- Funcs.TextXAlignment = Enum.TextXAlignment.Left
- Funcs.TextYAlignment = Enum.TextYAlignment.Top
- Methods.Name = "Methods"
- Methods.Parent = Source
- Methods.BackgroundColor3 = Color3.new(1, 1, 1)
- Methods.BackgroundTransparency = 1
- Methods.Size = UDim2.new(1, 0, 1, 0)
- Methods.ZIndex = 3
- Methods.Font = Enum.Font.Code
- Methods.Text = ""
- Methods.TextColor3 = Color3.fromRGB(255,255,255)
- Methods.TextSize = 20
- Methods.TextXAlignment = Enum.TextXAlignment.Left
- Methods.TextYAlignment = Enum.TextYAlignment.Top
- Nums.Name = "Nums"
- Nums.Parent = Source
- Nums.BackgroundColor3 = Color3.new(1, 1, 1)
- Nums.BackgroundTransparency = 1
- Nums.Size = UDim2.new(1, 0, 1, 0)
- Nums.ZIndex = 3
- Nums.Font = Enum.Font.Code
- Nums.Text = ""
- Nums.TextColor3 = Color3.fromRGB(255,255,255)
- Nums.TextSize = 20
- Nums.TextXAlignment = Enum.TextXAlignment.Left
- Nums.TextYAlignment = Enum.TextYAlignment.Top
- Comments.Name = "Comments"
- Comments.Parent = Source
- Comments.BackgroundColor3 = Color3.new(1, 1, 1)
- Comments.BackgroundTransparency = 1
- Comments.Size = UDim2.new(1, 0, 1, 0)
- Comments.ZIndex = 3
- Comments.Font = Enum.Font.Code
- Comments.Text = ""
- Comments.TextColor3 = Color3.fromRGB(255,255,255)
- Comments.TextSize = 20
- Comments.TextXAlignment = Enum.TextXAlignment.Left
- Comments.TextYAlignment = Enum.TextYAlignment.Top
- Title.Name = "Title"
- Title.Parent = Main
- Title.BackgroundColor3 = Color3.new(0.176471, 0.176471, 0.176471)
- Title.BorderSizePixel = 0
- Title.Position = UDim2.new(0, 0, -0.118598379, 0)
- Title.Size = UDim2.new(1, 0, 0.100000001, 0)
- Title.Font = Enum.Font.Cartoon
- Title.Text = "Skrubkid's Script Editor"
- Title.TextColor3 = Color3.new(1, 1, 1)
- Title.TextScaled = true
- Title.TextSize = 14
- Title.TextWrapped = true
- Title.Draggable = true
- Execute.Name = "Execute"
- Execute.Parent = Main
- Execute.BackgroundColor3 = Color3.new(0.176471, 0.176471, 0.176471)
- Execute.BorderSizePixel = 0
- Execute.Position = UDim2.new(-0.000273376703, 0, 1.04625702, 0)
- Execute.Size = UDim2.new(0, 200, 0, 50)
- Execute.Font = Enum.Font.Cartoon
- Execute.Text = "Execute"
- Execute.TextColor3 = Color3.new(1, 1, 1)
- Execute.TextSize = 25
- Clear.Name = "Clear"
- Clear.Parent = Main
- Clear.BackgroundColor3 = Color3.new(0.176471, 0.176471, 0.176471)
- Clear.BorderSizePixel = 0
- Clear.Position = UDim2.new(0.703430295, 0, 1.04625702, 0)
- Clear.Size = UDim2.new(0, 200, 0, 50)
- Clear.Font = Enum.Font.Cartoon
- Clear.Text = "Clear"
- Clear.TextColor3 = Color3.new(1, 1, 1)
- Clear.TextSize = 25
- LoadSource.Name = "LoadSource"
- LoadSource.Parent = Main
- LoadSource.BackgroundColor3 = Color3.new(0.176471, 0.176471, 0.176471)
- LoadSource.BorderSizePixel = 0
- LoadSource.Position = UDim2.new(0.351111114, 0, 1.04582214, 0)
- LoadSource.Size = UDim2.new(0, 200, 0, 50)
- LoadSource.Font = Enum.Font.Cartoon
- LoadSource.Text = "Obfuscate"
- LoadSource.TextColor3 = Color3.new(1, 1, 1)
- LoadSource.TextSize = 25
- Copy.Name = "Copy"
- Copy.Parent = Main
- Copy.BackgroundColor3 = Color3.new(0.176471, 0.176471, 0.176471)
- Copy.BorderSizePixel = 0
- Copy.Position = UDim2.new(0.351111114, 0, 1.04582214, 60)
- Copy.Size = UDim2.new(0, 200, 0, 50)
- Copy.Font = Enum.Font.Cartoon
- Copy.Text = "Copy"
- Copy.TextColor3 = Color3.new(1, 1, 1)
- Copy.TextSize = 25
- Scripts.Name = "Scripts"
- Scripts.Parent = Main
- Scripts.BackgroundColor3 = Color3.new(0.176471, 0.176471, 0.176471)
- Scripts.BorderSizePixel = 0
- Scripts.Position = UDim2.new(1.01333332, 0, -0.118598379, 0)
- Scripts.Size = UDim2.new(0, 186, 0, 482)
- -- Syntax Highlighting
- local Data = {
- Highlights = {
- Base = Color3.fromRGB(154,154,154),
- Tokens = Color3.fromRGB(179,255,184),
- Funcs = Color3.fromRGB(174,60,155),
- Methods = Color3.fromRGB(46,255,179),
- Nums = Color3.fromRGB(82,124,174),
- Vars = Color3.fromRGB(255,170,0),
- Env = Color3.fromRGB(255,7,19),
- Keywords = Color3.fromRGB(12,77,255),
- Strings = Color3.fromRGB(255,85,255),
- Comments = Color3.fromRGB(12,215,255)
- },
- Prioritys = {
- Base = 1,
- Tokens = 2,
- Funcs = 3,
- Methods = 4,
- Nums = 5,
- Vars = 6,
- Env = 7,
- Keywords = 8,
- Strings = 9,
- Comments = 10
- },
- Settings = {
- Focused = false
- }
- }
- function PrintTable(t)
- if not type(t) == "table" then return end
- for i,v in ipairs(t) do
- print(i,"=",v)
- end
- end
- local KeywordsT = {
- 'and', 'break', 'do', 'else', 'elseif',
- 'end', 'false', 'for', 'function', 'goto', 'if',
- 'in', 'local', 'nil', 'not', 'or', 'repeat',
- 'return', 'then', 'true', 'until', 'while'
- };
- local EnvT = {
- "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 TokensT = {
- ["="] = true,["."] = true,[","] = true,
- ["("] = true,[")"] = true,["["] = true,
- ["]"] = true,["{"] = true,["}"] = true,
- [":"] = true,["*"] = true,["/"] = true,
- ["+"] = true,["-"] = true,["%"] = true,
- [";"] = true,["~"] = true
- }
- local MethodsT = {
- "FireServer","InvokeServer","FireClient","InvokeClient",
- "FindFirstChild","WaitForChild","GetChildren","GetDescendants"
- }
- local variables = {}
- local functions = {}
- function HighlightKeys(str,keebies)
- local fs = str or ""
- local keys = {}
- for i,v in pairs(keebies) do
- keys[v] = true
- end
- fs = fs:gsub(".",function(s)
- if TokensT[s] then
- return " "
- else
- return s
- end
- end)
- fs = fs:gsub("%S+",function(s)
- if keys[s] then
- return s
- else
- return string.rep(" ",#s)
- end
- end)
- return fs
- end
- local HighlightTokens = function(string)
- local hl = ""
- string:gsub(".", function(s)
- if TokensT[s] then
- hl = hl .. s
- elseif s == "\n" then
- hl = hl .. "\n"
- elseif s == "\t" then
- hl = hl .. "\t"
- else
- hl = hl .. " "
- end
- end)
- return hl
- end
- function HighlightStrings(str)
- local fs = str
- local hl = ""
- local inQuotes = false
- fs = fs:gsub(".",function(s)
- if not inQuotes and s == "\"" then inQuotes = true
- elseif inQuotes and s == "\"" then inQuotes = false end
- if not inQuotes and s == "\"" then
- hl = hl .. "\""
- elseif s == "\t" then
- hl = hl .. "\t"
- elseif s == "\n" then
- hl = hl .. "\n"
- elseif inQuotes == true then
- hl = hl .. s
- elseif not inQuotes then
- hl = hl .. " "
- end
- return s
- end)
- return hl
- end
- function getVars(str)
- local fs = str
- variables = {}
- functions = {}
- fs:gsub("local ([%a%d_]+)",function(s)
- if not variables[s] then
- variables[s] = true
- end
- return s
- end)
- fs = fs:gsub("function (%a+)",function(s)
- if not functions[s] then
- functions[s] = true
- end
- return s
- end)
- end
- function HighlightVars(str)
- local fs = str or ""
- fs = fs:gsub(".",function(s)
- if TokensT[s] then
- return " "
- else
- return s
- end
- end)
- fs = fs:gsub("%S+",function(s)
- if variables[s] then
- return s
- else
- return string.rep(" ",#s)
- end
- end)
- return fs
- end
- function HighlightFuncs(str)
- local fs = str or ""
- fs = fs:gsub(".",function(s)
- if TokensT[s] then
- return " "
- else
- return s
- end
- end)
- fs = fs:gsub("%S+",function(s)
- if functions[s] then
- return s
- else
- return string.rep(" ",#s)
- end
- end)
- return fs
- end
- function HighlightMethods(str)
- local fs = str or ""
- local m = {}
- for i,v in pairs(MethodsT) do
- m[v] = true
- end
- fs = fs:gsub(".",function(s)
- if TokensT[s] then
- return " "
- else
- return s
- end
- end)
- fs = fs:gsub("%S+",function(s)
- if m[s] then
- return s
- else
- return string.rep(" ",#s)
- end
- end)
- return fs
- end
- function HighlightNums(str)
- local fs = str or ""
- local n = {0,1,2,3,4,5,6,7,8,9}
- local nn = {}
- for i,v in pairs(n) do
- nn[tostring(v)] = true
- end
- fs = fs:gsub(".",function(s)
- if TokensT[s] then
- return " "
- else
- return s
- end
- end)
- fs = fs:gsub("%S",function(s)
- if nn[s] then
- return s
- else
- return string.rep(" ",#s)
- end
- end)
- return fs
- end
- function HighlightComments(str)
- local fs = str
- local hl = ""
- local com = false
- fs = fs:gsub("([^\n]+)",function(s)
- local n = #s
- local g
- g = s:gsub("%-%-(.-)\n",function(ss)
- local nn = n-#ss
- print(nn)
- return string.rep(" ",nn)..ss
- end)
- if com then
- return g
- else
- return
- end
- end)
- return fs
- end
- function syntax(str)
- Source.TextColor3 = Data.Highlights.Base
- for i,v in pairs(Source:GetChildren()) do
- if Data.Highlights[v.Name] then
- v.TextColor3 = Data.Highlights[v.Name]
- end
- if Data.Prioritys[v.Name] then
- v.ZIndex = Data.Prioritys[v.Name]
- end
- end
- getVars(Source.Text)
- Source.Text = Source.Text:gsub("\13", "")
- Source.Text = Source.Text:gsub("\t", " ")
- Source.Text = Source.Text:gsub("\t", "")
- Keywords.Text = HighlightKeys(str,KeywordsT)
- Env.Text = HighlightKeys(str,EnvT)
- Strings.Text = HighlightStrings(str)
- Tokens.Text = HighlightTokens(str)
- Vars.Text = HighlightVars(str)
- Funcs.Text = HighlightFuncs(str)
- Methods.Text = HighlightMethods(str)
- Nums.Text = HighlightNums(str)
- LineNum.Text = ""
- line = 1
- str:gsub("\n",function(s)
- line = line + 1
- end)
- for i = 1,line do
- LineNum.Text = LineNum.Text .. tostring(i).."\n"
- end
- Container.CanvasSize = UDim2.new(0,Source.TextBounds.X+100,0,Source.TextBounds.Y)
- Container.ZIndex = 11
- Source.Position = UDim2.new(0,25,0,0)
- end
- syntax(Source.Text)
- -- Connections
- Source.Focused:Connect(function()
- Data.Settings.Focused = true
- end)
- Source.FocusLost:Connect(function()
- Data.Settings.Focused = false
- end)
- Source.Changed:Connect(function()
- syntax(Source.Text)
- end)
- uis.InputBegan:Connect(function(obj,busy)
- local key = obj.KeyCode
- if key == Enum.KeyCode.Tab then
- if not Data.Settings.Focused then return end
- wait()
- Source:ReleaseFocus()
- wait()
- Source:CaptureFocus()
- elseif key == Enum.KeyCode.U then
- if busy then return end
- Container.CanvasPosition = Container.CanvasPosition + Vector2.new(40,0)
- elseif key == Enum.KeyCode.Y then
- if busy then return end
- Container.CanvasPosition = Container.CanvasPosition - Vector2.new(40,0)
- end
- end)
- Execute.MouseButton1Click:Connect(function()
- local s,e = pcall(function()
- loadstring(Source.Text)()
- end)
- if not s then
- print("Error occurred!")
- end
- end)
- Clear.MouseButton1Click:Connect(function()
- Source.Text = ""
- end)
- LoadSource.MouseButton1Click:Connect(function()
- local start = tick()
- Source.Text = obfuscate(Source.Text)
- print("Obfuscation completed in",tick()-start,"seconds")
- end)
- Title.MouseButton1Click:Connect(function()
- local t = 1
- Main:TweenPosition(UDim2.new(-0.5,0,0.5,0),Enum.EasingDirection.In,Enum.EasingStyle.Back,t)
- wait(t)
- local open = Instance.new("TextButton")
- open.Size = UDim2.new(0,250,0,50)
- open.Position = UDim2.new(-0.5,0,0.7,0)
- open.BorderSizePixel = 0
- open.BackgroundColor3 = Color3.fromRGB(45,45,45)
- open.BackgroundTransparency = 0
- open.Text = "Toggle Script Editor"
- open.TextSize = 15
- open.TextColor3 = Color3.new(1,1,1)
- open.Font = Enum.Font.Cartoon
- open.Parent = Editor
- open:TweenPosition(UDim2.new(0,3,0.7,0),Enum.EasingDirection.Out,Enum.EasingStyle.Back,t)
- open.MouseButton1Click:Connect(function()
- open:TweenPosition(UDim2.new(-0.4,0,0.7,0),Enum.EasingDirection.In,Enum.EasingStyle.Back,t)
- wait(t)
- Main:TweenPosition(UDim2.new(0.425,0,0.5,0),Enum.EasingDirection.Out,Enum.EasingStyle.Back,t)
- open:Destroy()
- end)
- end)
- Copy.MouseButton1Click:Connect(function()
- if Synapse then
- Synapse:CopyString(Source.Text)
- end
- end)
- -- Scripts
- local scripts = {
- {"Walkspeed Changer","Zm72J5EE"}
- }
- local preloads = {
- {"Stat Change",[[
- local player = game.Players.LocalPlayer
- local char = player.Character or player.CharacterAdded:wait()
- local hum = char.Humanoid
- local StatName = "" -- Put stat name here
- local value -- Put what you want to set it to here
- local leaderstats = player:FindFirstChild("leaderstats")
- if leaderstats then
- local stat = leaderstats:FindFirstChild(StatName)
- if stat then
- stat.Value = value
- else
- print("No stat with the given name exists!")
- end
- else
- print("Leaderstats doesn't exist")
- end]]},
- {"JumpPower Changer",[[
- local player = game.Players.LocalPlayer
- local char = player.Character or player.CharacterAdded:wait()
- local hum = char.Humanoid
- local power = 250 -- Set to what you want your JumpPower to be
- hum.JumpPower = tonumber(power) or 50
- ]]}
- }
- for i,v in pairs(scripts) do
- local c = Scripts:GetChildren()
- if #c > 0 then
- for i,v in pairs(c) do
- v.Position = v.Position + UDim2.new(0,0,0,50)
- end
- end
- local btn = Instance.new("TextButton")
- btn.Size = UDim2.new(1,0,0,50)
- btn.Position = UDim2.new(0,0,0,0)
- btn.BackgroundTransparency = 0
- btn.BackgroundColor3 = Color3.fromRGB(45,45,45)
- btn.BorderSizePixel = 0
- btn.Text = v[1]
- btn.TextSize = 20
- btn.TextColor3 = Color3.new(1,1,1)
- btn.Font = Enum.Font.Cartoon
- btn.Parent = Scripts
- btn.MouseButton1Click:Connect(function()
- local url = "https://pastebin.com/raw/"..v[2]
- local suc,err = pcall(function()
- game:HttpGetAsync(url)
- end)
- if err then
- Source.Text = "local err = \"Error fetching script\""
- else
- local s = game:HttpGet(url)
- local n = 1
- s:gsub("\n",function(s)
- n = n + 1
- return s
- end)
- print(n)
- if n > 50 then
- Source.Text = "local err = \"Script is to long!\""
- return
- end
- Source.Text = s
- end
- end)
- end
- for i,v in pairs(preloads) do
- local c = Scripts:GetChildren()
- if #c > 0 then
- for i,v in pairs(c) do
- v.Position = v.Position + UDim2.new(0,0,0,50)
- end
- end
- local btn = Instance.new("TextButton")
- btn.Size = UDim2.new(1,0,0,50)
- btn.Position = UDim2.new(0,0,0,0)
- btn.BackgroundTransparency = 0
- btn.BackgroundColor3 = Color3.fromRGB(45,45,45)
- btn.BorderSizePixel = 0
- btn.Text = v[1]
- btn.TextSize = 20
- btn.TextColor3 = Color3.new(1,1,1)
- btn.Font = Enum.Font.Cartoon
- btn.Parent = Scripts
- btn.MouseButton1Click:Connect(function()
- if v[2] then
- Source.Text = v[2]
- end
- end)
- end
- -- Obfuscation
- local Keywords1 = {
- 'and', 'break', 'do', 'else', 'elseif',
- 'end', 'false', 'for', 'function', 'goto', 'if',
- 'in', 'local', 'nil', 'not', 'or', 'repeat',
- 'return', 'then', 'true', 'until', 'while'
- };
- local Keywords = {
- "local"
- }
- local Functions = {
- "game","print","warn","string.sub","string.find","string.gsub",
- "string.gfind","string.reverse","string.rep","string.match",
- "string.char","string.dump","string.byte","string.upper",
- "string.len","string.format","string.gmatch","string.lower",
- "table.setn","table.insert","table.getn","table.foreachi",
- "table.maxn","table.foreach","table.concat","table.remove",
- "table.sort","wait","Color3.new","UDim2.new","Vector3.new",
- "CFrame.new","Instance.new","loadstring","tostring","tonumber"
- }
- local Tokens = {
- ["="] = true,["."] = true,[","] = true,
- ["("] = true,[")"] = true,["["] = true,
- ["]"] = true,["{"] = true,["}"] = true,
- [":"] = true,["*"] = true,["/"] = true,
- ["+"] = true,["-"] = true,["%"] = true,
- [";"] = true,["~"] = true,["\""] = true
- }
- local cache = {}
- function hash(s)
- local n = ""
- for i = 1,s do
- n = n .. string.char(math.random(97,122))
- end
- return "_"..n
- end
- function hashN(s)
- local n = ""
- for i = 1,s do
- n = n .. math.random(0,9)
- end
- return "_"..n
- end
- local Bools = {
- [true] = hash(8),
- [false] = hash(8)
- }
- local fluffstuff = {
- {"tonumber","\""..hashN(8).."\""},
- {"string.len","\"yourmumisgay\""},
- {"Vector3.new",math.random(1,99).."," .. math.random(1,99).."," .. math.random(1,99)}
- }
- function count(t)
- local n = 0
- for i,v in pairs(t) do
- n = n + 1
- end
- return n
- end
- for i,v in pairs(Functions) do
- local f = v
- table.remove(Functions,i)
- table.insert(Functions,math.random(1,#Functions),f)
- end
- local Enums = {}
- local Variables = {}
- local Env = {}
- local Funcs = {}
- function makeVar(i,v)
- return "local "..i.."="..v..";"
- end
- function getVars2(str)
- local fs = str
- fs = fs:gsub("local ([%a%d_]+)",function(s)
- Variables[s] = hash(5)
- return s
- end)
- end
- function hashVars(str)
- local fs = str
- for i,v in pairs(Variables) do
- fs = fs:gsub(i,v)
- end
- return fs
- end
- function hashEnv(str)
- local fs = str
- for i,v in pairs(Functions) do
- fs = fs:gsub(v,function(s)
- local h = hash(5)
- if not Env[v] then
- Env[v] = h
- return h
- else
- return Env[v]
- end
- return s
- end)
- end
- for i,v in pairs(Env) do
- fs = makeVar(v,i)..fs
- end
- return fs
- end
- function hashEnums(str)
- local fs = str
- for i,v in pairs(Enum:GetEnums()) do
- local name = tostring(v)
- local e = Enum[name]:GetEnumItems()
- for ii,vv in pairs(e) do
- Enums[tostring(vv)] = hash(8)
- end
- end
- local oof
- for i,v in pairs(Enums) do
- fs = string.gsub(str,tostring(i),function(s)
- local a = makeVar(v,i)
- if a then
- oof = a
- end
- return v
- end)
- end
- if oof then
- fs = oof..fs
- end
- return fs
- end
- function byteStrings(str)
- local fs = str
- fs = fs:gsub("\"(.-)\"",function(s)
- local n = ""
- for i = 1,#s do
- n = n .. "\\" .. string.byte(s:sub(i,i))
- end
- return "\""..n.."\""
- end)
- return fs
- end
- function format(str)
- local fs = str
- fs = fs:gsub("([^\n]+)",function(s)
- if Tokens[s] or s:sub(#s,#s) == ";" then
- return s
- else
- return s..";"
- end
- end)
- fs = fs:gsub("\n","")
- return fs
- end
- function obfuscate(str)
- local fs = str
- getVars2(fs)
- fs = byteStrings(fs)
- fs = hashVars(fs)
- fs = hashEnv(fs)
- fs = hashEnums(fs)
- return fs
- end
- local msg = [[
- --------------------------------------------------------------------
- Welcome to SkubKid's Script Editor & Obfuscator
- This does lag on slower machines so don't paste in a big script as this is designed for small scripts
- If you want to obfuscate a bigger script or have any inquiries go to discord.me/skrubkid to join my community discord!
- To scroll side to side on the Editor un-select it and press 'Y' or 'U' to scroll sideways
- Click on the title to close the Editor
- --------------------------------------------------------------------
- ]]
- warn(msg)
- spawn(function()
- while wait(5) do
- warn("https://discord.me/skrubkid")
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment