Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- player = game.Players.LocalPlayer
- if game:GetService("MarketplaceService"):PlayerOwnsAsset(player, 2695558976) then
- texts = {
- "why did roblox remove fd"; --1
- "proto smasher lol"; --2
- "didnt expect you to be here"; --3
- "oof"; --4
- "2019 huh?"; --5
- "this was easy to code"; --6
- "to be honest i like exploiting legos"; --7
- }
- -- Objects
- local urmomJailbreakGUI = Instance.new("ScreenGui")
- local Title = Instance.new("TextLabel")
- local version = Instance.new("TextLabel")
- local LoadingFrame = Instance.new("Frame")
- local LoadingIcon = Instance.new("ImageLabel")
- local loadingtext = Instance.new("TextLabel")
- local TextLabel = Instance.new("TextLabel")
- local TextLabel_2 = Instance.new("TextLabel")
- local urmombackground = Instance.new("Frame")
- local credits = Instance.new("TextLabel")
- local gravitybutton = Instance.new("TextButton")
- local autorobgui = Instance.new("TextButton")
- local speedbutton = Instance.new("TextButton")
- local nitrobutton = Instance.new("TextButton")
- local blacklisted = Instance.new("TextLabel")
- local scriptexecutorbutton = Instance.new("TextButton")
- local EditorFrame = Instance.new("ScrollingFrame")
- local Source = Instance.new("TextBox")
- local Comments_ = Instance.new("TextLabel")
- 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 Lines = Instance.new("TextLabel")
- local execute = Instance.new("TextButton")
- local clear = Instance.new("TextButton")
- -- Properties
- urmomJailbreakGUI.Name = "urmomJailbreakGUI"
- urmomJailbreakGUI.Parent = game.CoreGui
- Title.Name = "Title"
- Title.Parent = urmomJailbreakGUI
- Title.BackgroundColor3 = Color3.new(1, 1, 1)
- Title.BackgroundTransparency = 1
- Title.Position = UDim2.new(0.0403286032, 0, 0.0357142873, 0)
- Title.Size = UDim2.new(0, 228, 0, 62)
- Title.Font = Enum.Font.SourceSansLight
- Title.Text = "ur mom"
- Title.TextColor3 = Color3.new(0, 1, 0.498039)
- Title.TextScaled = true
- Title.TextSize = 14
- Title.TextWrapped = true
- version.Name = "version"
- version.Parent = urmomJailbreakGUI
- version.BackgroundColor3 = Color3.new(1, 1, 1)
- version.BackgroundTransparency = 1
- version.Position = UDim2.new(0.111277066, 0, 0.0726601034, 0)
- version.Size = UDim2.new(0, 228, 0, 62)
- version.Font = Enum.Font.SourceSansLight
- version.Text = "v0.1"
- version.TextColor3 = Color3.new(0.301961, 0.301961, 0.301961)
- version.TextSize = 31
- version.TextWrapped = true
- LoadingFrame.Name = "LoadingFrame"
- LoadingFrame.Parent = urmomJailbreakGUI
- LoadingFrame.BackgroundColor3 = Color3.new(0.282353, 0.282353, 0.282353)
- LoadingFrame.BorderSizePixel = 0
- LoadingFrame.Position = UDim2.new(0.440390825, 0, 0.339234829, 0)
- LoadingFrame.Size = UDim2.new(0, 239, 0, 326)
- LoadingIcon.Name = "LoadingIcon"
- LoadingIcon.Parent = LoadingFrame
- LoadingIcon.BackgroundColor3 = Color3.new(1, 1, 1)
- LoadingIcon.BackgroundTransparency = 1
- LoadingIcon.BorderSizePixel = 0
- LoadingIcon.Position = UDim2.new(0.251046032, 0, 0.125766873, 0)
- LoadingIcon.Size = UDim2.new(0, 121, 0, 123)
- LoadingIcon.Image = "rbxassetid://714343976"
- loadingtext.Name = "loadingtext"
- loadingtext.Parent = LoadingFrame
- loadingtext.BackgroundColor3 = Color3.new(1, 1, 1)
- loadingtext.BackgroundTransparency = 1
- loadingtext.Position = UDim2.new(0.079497911, 0, 0.668711662, 0)
- loadingtext.Size = UDim2.new(0, 200, 0, 50)
- loadingtext.Font = Enum.Font.SourceSansLight
- loadingtext.Text = "LOADING UR MOM..."
- loadingtext.TextColor3 = Color3.new(1, 1, 1)
- loadingtext.TextScaled = true
- loadingtext.TextSize = 14
- loadingtext.TextWrapped = true
- TextLabel.Parent = LoadingFrame
- TextLabel.BackgroundColor3 = Color3.new(1, 1, 1)
- TextLabel.BackgroundTransparency = 1
- TextLabel.Size = UDim2.new(0, 63, 0, 50)
- TextLabel.Font = Enum.Font.SourceSansSemibold
- TextLabel.Text = "S"
- TextLabel.TextColor3 = Color3.new(1, 1, 1)
- TextLabel.TextScaled = true
- TextLabel.TextSize = 14
- TextLabel.TextWrapped = true
- TextLabel_2.Parent = LoadingFrame
- TextLabel_2.BackgroundColor3 = Color3.new(1, 1, 1)
- TextLabel_2.BackgroundTransparency = 1
- TextLabel_2.Position = UDim2.new(0.0920502022, 0, -0.0276073627, 0)
- TextLabel_2.Size = UDim2.new(0, 52, 0, 38)
- TextLabel_2.Font = Enum.Font.SourceSansSemibold
- TextLabel_2.Text = "x"
- TextLabel_2.TextColor3 = Color3.new(1, 0.666667, 0)
- TextLabel_2.TextScaled = true
- TextLabel_2.TextSize = 14
- TextLabel_2.TextWrapped = true
- urmombackground.Name = "urmombackground"
- urmombackground.Parent = urmomJailbreakGUI
- urmombackground.BackgroundColor3 = Color3.new(0.282353, 0.282353, 0.282353)
- urmombackground.BorderSizePixel = 0
- urmombackground.Position = UDim2.new(0.0978342071, 0, 0.336206913, 0)
- urmombackground.Size = UDim2.new(0, 339, 0, 265)
- urmombackground.Visible = false
- credits.Name = "credits"
- credits.Parent = urmombackground
- credits.BackgroundColor3 = Color3.new(1, 1, 1)
- credits.BackgroundTransparency = 1
- credits.Size = UDim2.new(0, 171, 0, 43)
- credits.Font = Enum.Font.SourceSansLight
- credits.Text = "GUI made by Freak_A_Zoid1#9144 and 3vpl#6684"
- credits.TextColor3 = Color3.new(1, 1, 1)
- credits.TextScaled = true
- credits.TextSize = 14
- credits.TextWrapped = true
- gravitybutton.Name = "gravitybutton"
- gravitybutton.Parent = urmombackground
- gravitybutton.BackgroundColor3 = Color3.new(1, 1, 1)
- gravitybutton.BorderSizePixel = 0
- gravitybutton.Position = UDim2.new(0.02359882, 0, 0.207547173, 0)
- gravitybutton.Size = UDim2.new(0, 100, 0, 50)
- gravitybutton.Font = Enum.Font.SourceSansLight
- gravitybutton.Text = "Bypass gravity."
- gravitybutton.TextColor3 = Color3.new(0, 0, 0)
- gravitybutton.TextScaled = true
- gravitybutton.TextSize = 14
- gravitybutton.TextWrapped = true
- autorobgui.Name = "autorobgui"
- autorobgui.Parent = urmombackground
- autorobgui.BackgroundColor3 = Color3.new(1, 1, 1)
- autorobgui.BorderSizePixel = 0
- autorobgui.Position = UDim2.new(0.657817125, 0, 0.207547173, 0)
- autorobgui.Size = UDim2.new(0, 100, 0, 50)
- autorobgui.Font = Enum.Font.SourceSansLight
- autorobgui.Text = "Auto rob GUI."
- autorobgui.TextColor3 = Color3.new(0, 0, 0)
- autorobgui.TextScaled = true
- autorobgui.TextSize = 14
- autorobgui.TextWrapped = true
- speedbutton.Name = "speedbutton"
- speedbutton.Parent = urmombackground
- speedbutton.BackgroundColor3 = Color3.new(1, 1, 1)
- speedbutton.BorderSizePixel = 0
- speedbutton.Position = UDim2.new(0.0235988498, 0, 0.528301895, 0)
- speedbutton.Size = UDim2.new(0, 100, 0, 50)
- speedbutton.Font = Enum.Font.SourceSansLight
- speedbutton.Text = "Bypass speed."
- speedbutton.TextColor3 = Color3.new(0, 0, 0)
- speedbutton.TextScaled = true
- speedbutton.TextSize = 14
- speedbutton.TextWrapped = true
- nitrobutton.Name = "nitrobutton"
- nitrobutton.Parent = urmombackground
- nitrobutton.BackgroundColor3 = Color3.new(1, 1, 1)
- nitrobutton.BorderSizePixel = 0
- nitrobutton.Position = UDim2.new(0.657817125, 0, 0.528301895, 0)
- nitrobutton.Size = UDim2.new(0, 100, 0, 50)
- nitrobutton.Font = Enum.Font.SourceSansLight
- nitrobutton.Text = "Infinite Nitro"
- nitrobutton.TextColor3 = Color3.new(0, 0, 0)
- nitrobutton.TextScaled = true
- nitrobutton.TextSize = 14
- nitrobutton.TextWrapped = true
- blacklisted.Name = "blacklisted"
- blacklisted.Parent = urmombackground
- blacklisted.BackgroundColor3 = Color3.new(0.282353, 0.282353, 0.282353)
- blacklisted.Size = UDim2.new(0, 339, 0, 265)
- blacklisted.Visible = false
- blacklisted.Font = Enum.Font.SourceSansLight
- blacklisted.Text = "You have been blacklisted."
- blacklisted.TextColor3 = Color3.new(1, 1, 1)
- blacklisted.TextScaled = true
- blacklisted.TextSize = 14
- blacklisted.TextWrapped = true
- scriptexecutorbutton.Name = "scriptexecutorbutton"
- scriptexecutorbutton.Parent = urmombackground
- scriptexecutorbutton.BackgroundColor3 = Color3.new(1, 1, 1)
- scriptexecutorbutton.BorderSizePixel = 0
- scriptexecutorbutton.Position = UDim2.new(0.318584085, 0, 0.856603801, 0)
- scriptexecutorbutton.Size = UDim2.new(0, 115, 0, 24)
- scriptexecutorbutton.Font = Enum.Font.SourceSansLight
- scriptexecutorbutton.Text = "Script executor."
- scriptexecutorbutton.TextColor3 = Color3.new(0, 0, 0)
- scriptexecutorbutton.TextScaled = true
- scriptexecutorbutton.TextSize = 14
- scriptexecutorbutton.TextWrapped = true
- EditorFrame.Name = "EditorFrame"
- EditorFrame.Parent = urmomJailbreakGUI
- EditorFrame.BackgroundColor3 = Color3.new(0.145098, 0.145098, 0.145098)
- EditorFrame.BorderColor3 = Color3.new(0.243137, 0.243137, 0.243137)
- EditorFrame.Position = UDim2.new(0, 1245,0, 672)
- EditorFrame.Size = UDim2.new(0, 637, 0, 184)
- EditorFrame.ZIndex = 3
- EditorFrame.BottomImage = "rbxassetid://148970562"
- EditorFrame.CanvasSize = UDim2.new(0, 0, 0, 0)
- EditorFrame.HorizontalScrollBarInset = Enum.ScrollBarInset.ScrollBar
- EditorFrame.MidImage = "rbxassetid://148970562"
- EditorFrame.ScrollBarThickness = 5
- EditorFrame.TopImage = "rbxassetid://148970562"
- EditorFrame.Visible = false
- Source.Name = "Source"
- Source.Parent = EditorFrame
- Source.BackgroundColor3 = Color3.new(1, 1, 1)
- Source.BackgroundTransparency = 1
- Source.Position = UDim2.new(0, 30, 0, 0)
- Source.Size = UDim2.new(1, 0, 1, 0)
- Source.ZIndex = 3
- Source.ClearTextOnFocus = false
- Source.Font = Enum.Font.Code
- Source.MultiLine = true
- Source.PlaceholderColor3 = Color3.new(0.8, 0.8, 0.8)
- Source.Text = "print(\"Not all scripts will work.\")"
- Source.TextColor3 = Color3.new(0.8, 0.8, 0.8)
- Source.TextSize = 15
- Source.TextWrapped = true
- Source.TextXAlignment = Enum.TextXAlignment.Left
- Source.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 = 5
- Comments_.Font = Enum.Font.Code
- Comments_.Text = ""
- Comments_.TextColor3 = Color3.new(0.231373, 0.784314, 0.231373)
- Comments_.TextSize = 15
- Comments_.TextXAlignment = Enum.TextXAlignment.Left
- Comments_.TextYAlignment = Enum.TextYAlignment.Top
- Globals_.Name = "Globals_"
- Globals_.Parent = Source
- Globals_.BackgroundColor3 = Color3.new(1, 1, 1)
- Globals_.BackgroundTransparency = 1
- Globals_.Size = UDim2.new(1, 0, 1, 0)
- Globals_.ZIndex = 5
- Globals_.Font = Enum.Font.Code
- Globals_.Text = ""
- Globals_.TextColor3 = Color3.new(0.517647, 0.839216, 0.968628)
- Globals_.TextSize = 15
- Globals_.TextXAlignment = Enum.TextXAlignment.Left
- Globals_.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_.ZIndex = 5
- Keywords_.Font = Enum.Font.Code
- Keywords_.Text = ""
- Keywords_.TextColor3 = Color3.new(0.972549, 0.427451, 0.486275)
- Keywords_.TextSize = 15
- Keywords_.TextXAlignment = Enum.TextXAlignment.Left
- Keywords_.TextYAlignment = Enum.TextYAlignment.Top
- RemoteHighlight_.Name = "RemoteHighlight_"
- RemoteHighlight_.Parent = Source
- RemoteHighlight_.BackgroundColor3 = Color3.new(1, 1, 1)
- RemoteHighlight_.BackgroundTransparency = 1
- RemoteHighlight_.Size = UDim2.new(1, 0, 1, 0)
- RemoteHighlight_.ZIndex = 5
- RemoteHighlight_.Font = Enum.Font.Code
- RemoteHighlight_.Text = ""
- RemoteHighlight_.TextColor3 = Color3.new(0, 0.568627, 1)
- RemoteHighlight_.TextSize = 15
- RemoteHighlight_.TextXAlignment = Enum.TextXAlignment.Left
- RemoteHighlight_.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_.ZIndex = 5
- Strings_.Font = Enum.Font.Code
- Strings_.Text = ""
- Strings_.TextColor3 = Color3.new(0.678431, 0.945098, 0.584314)
- Strings_.TextSize = 15
- 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_.ZIndex = 5
- Tokens_.Font = Enum.Font.Code
- Tokens_.Text = ""
- Tokens_.TextColor3 = Color3.new(1, 1, 1)
- Tokens_.TextSize = 15
- Tokens_.TextXAlignment = Enum.TextXAlignment.Left
- Tokens_.TextYAlignment = Enum.TextYAlignment.Top
- Numbers_.Name = "Numbers_"
- Numbers_.Parent = Source
- Numbers_.BackgroundColor3 = Color3.new(1, 1, 1)
- Numbers_.BackgroundTransparency = 1
- Numbers_.Size = UDim2.new(1, 0, 1, 0)
- Numbers_.ZIndex = 4
- Numbers_.Font = Enum.Font.Code
- Numbers_.Text = ""
- Numbers_.TextColor3 = Color3.new(1, 0.776471, 0)
- Numbers_.TextSize = 15
- Numbers_.TextXAlignment = Enum.TextXAlignment.Left
- Numbers_.TextYAlignment = Enum.TextYAlignment.Top
- Lines.Name = "Lines"
- Lines.Parent = EditorFrame
- Lines.BackgroundColor3 = Color3.new(1, 1, 1)
- Lines.BackgroundTransparency = 1
- Lines.Size = UDim2.new(0, 30, 1, 0)
- Lines.ZIndex = 4
- Lines.Font = Enum.Font.Code
- Lines.Text = "1"
- Lines.TextColor3 = Color3.new(1, 1, 1)
- Lines.TextSize = 15
- Lines.TextYAlignment = Enum.TextYAlignment.Top
- execute.Name = "execute"
- execute.Parent = urmomJailbreakGUI
- execute.BackgroundColor3 = Color3.new(1, 1, 1)
- execute.BorderSizePixel = 0
- execute.Position = UDim2.new(0.648, 0,0.674, 0)
- execute.Size = UDim2.new(0, 200, 0, 50)
- execute.Font = Enum.Font.SourceSansLight
- execute.Text = "Execute."
- execute.TextColor3 = Color3.new(0, 0, 0)
- execute.TextScaled = true
- execute.TextSize = 14
- execute.TextWrapped = true
- execute.Visible = false
- clear.Name = "clear"
- clear.Parent = urmomJailbreakGUI
- clear.BackgroundColor3 = Color3.new(1, 1, 1)
- clear.BorderSizePixel = 0
- clear.Position = UDim2.new(0.876, 0,0.674, 0)
- clear.Size = UDim2.new(0, 200, 0, 50)
- clear.Font = Enum.Font.SourceSansLight
- clear.Text = "Clear."
- clear.TextColor3 = Color3.new(0, 0, 0)
- clear.TextScaled = true
- clear.TextSize = 14
- clear.TextWrapped = true
- clear.Visible = false
- loadingtext.Text = string.upper(texts[math.random(1,7)])
- for i=1,300 do wait()
- local timeInCycle = tick() % 2
- local cycleAlpha = (function()
- local t = (timeInCycle / 2) * 2
- if t < 1 then
- return 1 / 2 * t*t*t + 0
- else
- t = t - 2
- return 1 / 2 * (t * t * t + 2) + 1
- end
- end)()
- LoadingIcon.Rotation = cycleAlpha * 360
- end
- LoadingFrame.Visible = false
- urmombackground.Visible = true
- local UserInputService,gui,dragging,dragInput,dragStart,startPos = game:GetService("UserInputService"),urmombackground
- local function update(input)
- local delta = input.Position - dragStart
- wait(0.1)
- gui.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
- end
- gui.InputBegan:Connect(function(input)
- if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
- dragging = true
- dragStart = input.Position
- startPos = gui.Position
- input.Changed:Connect(function()
- if input.UserInputState == Enum.UserInputState.End then
- dragging = false
- end
- end)
- end
- end)
- gui.InputChanged:Connect(function(input)
- if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then
- dragInput = input
- end
- end)
- UserInputService.InputChanged:Connect(function(input)
- if input == dragInput and dragging then
- update(input)
- end
- end)
- gravitybutton.MouseButton1Click:Connect(function()
- if game:GetService("Workspace").Gravity == 42 then
- game:GetService("Workspace").Gravity = 196.2;
- else
- game:GetService("Workspace").Gravity = 42;
- end
- end)
- autorobgui.MouseButton1Click:Connect(function()
- loadstring(game:GetObjects("rbxassetid://1461971147")[1].Source)()
- end)
- speedbutton.MouseButton1Click:Connect(function()
- if game:GetService("Players").LocalPlayer.Character.Humanoid.WalkSpeed == 200 then
- _G.WS = 16;
- local Humanoid = game:GetService("Players").LocalPlayer.Character.Humanoid;
- Humanoid:GetPropertyChangedSignal("WalkSpeed"):Connect(function()
- Humanoid.WalkSpeed = _G.WS;
- end)
- Humanoid.WalkSpeed = _G.WS;
- else
- _G.WS = 200;
- local Humanoid = game:GetService("Players").LocalPlayer.Character.Humanoid;
- Humanoid:GetPropertyChangedSignal("WalkSpeed"):Connect(function()
- Humanoid.WalkSpeed = _G.WS;
- end)
- Humanoid.WalkSpeed = _G.WS;
- end
- end)
- nitrobutton.MouseButton1Click:Connect(function()
- nitrobutton.Text = "Patched."
- wait(2)
- nitrobutton.Text = "Infinite Nitro"
- end)
- scriptexecutorbutton.MouseButton1Click:connect(function()
- if EditorFrame.Visible == false then
- EditorFrame.Visible = true
- execute.Visible = true
- clear.Visible = true
- else
- EditorFrame.Visible = false
- execute.Visible = false
- clear.Visible = false
- end
- end)
- execute.MouseButton1Click:Connect(function()
- loadstring(Source.Text)()
- end)
- clear.MouseButton1Click:Connect(function()
- Source.Text = ""
- end)
- local lua_keywords = {"and", "break", "do", "else", "elseif", "end", "false", "for", "function", "goto", "if", "in", "local", "nil", "not", "or", "repeat", "return", "then", "true", "until", "while"}
- local global_env = {"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 Source = Source
- local Lines = Lines
- local Highlight = function(string, keywords)
- local K = {}
- local S = string
- local Token =
- {
- ["="] = true,
- ["."] = true,
- [","] = true,
- ["("] = true,
- [")"] = true,
- ["["] = true,
- ["]"] = true,
- ["{"] = true,
- ["}"] = true,
- [":"] = true,
- ["*"] = true,
- ["/"] = true,
- ["+"] = true,
- ["-"] = true,
- ["%"] = true,
- [";"] = true,
- ["~"] = true
- }
- for i, v in pairs(keywords) do
- K[v] = true
- end
- S = S:gsub(".", function(c)
- if Token[c] ~= nil then
- return "\32"
- else
- return c
- end
- end)
- S = S:gsub("%S+", function(c)
- if K[c] ~= nil then
- return c
- else
- return (" "):rep(#c)
- end
- end)
- return S
- end
- local hTokens = function(string)
- local Token =
- {
- ["="] = true,
- ["."] = true,
- [","] = true,
- ["("] = true,
- [")"] = true,
- ["["] = true,
- ["]"] = true,
- ["{"] = true,
- ["}"] = true,
- [":"] = true,
- ["*"] = true,
- ["/"] = true,
- ["+"] = true,
- ["-"] = true,
- ["%"] = true,
- [";"] = true,
- ["~"] = true
- }
- local A = ""
- string:gsub(".", function(c)
- if Token[c] ~= nil then
- A = A .. c
- elseif c == "\n" then
- A = A .. "\n"
- elseif c == "\t" then
- A = A .. "\t"
- else
- A = A .. "\32"
- end
- end)
- return A
- end
- local strings = function(string)
- local highlight = ""
- local quote = false
- string:gsub(".", function(c)
- if quote == false and c == "\"" then
- quote = true
- elseif quote == true and c == "\"" then
- quote = false
- end
- if quote == false and c == "\"" then
- highlight = highlight .. "\""
- elseif c == "\n" then
- highlight = highlight .. "\n"
- elseif c == "\t" then
- highlight = highlight .. "\t"
- elseif quote == true then
- highlight = highlight .. c
- elseif quote == false then
- highlight = highlight .. "\32"
- end
- end)
- return highlight
- end
- local comments = function(string)
- local ret = ""
- string:gsub("[^\r\n]+", function(c)
- local comm = false
- local i = 0
- c:gsub(".", function(n)
- i = i + 1
- if c:sub(i, i + 1) == "--" then
- comm = true
- end
- if comm == true then
- ret = ret .. n
- else
- ret = ret .. "\32"
- end
- end)
- ret = ret
- end)
- return ret
- end
- local numbers = function(string)
- local A = ""
- string:gsub(".", function(c)
- if tonumber(c) ~= nil then
- A = A .. c
- elseif c == "\n" then
- A = A .. "\n"
- elseif c == "\t" then
- A = A .. "\t"
- else
- A = A .. "\32"
- end
- end)
- return A
- end
- local highlight_source = function(type)
- if type == "Text" then
- Source.Text = Source.Text:gsub("\13", "")
- Source.Text = Source.Text:gsub("\t", " ")
- local s = Source.Text
- Source.Keywords_.Text = Highlight(s, lua_keywords)
- Source.Globals_.Text = Highlight(s, global_env)
- Source.RemoteHighlight_.Text = Highlight(s, {"FireServer", "fireServer", "InvokeServer", "invokeServer"})
- Source.Tokens_.Text = hTokens(s)
- Source.Numbers_.Text = numbers(s)
- Source.Strings_.Text = strings(s)
- local lin = 1
- s:gsub("\n", function()
- lin = lin + 1
- end)
- Lines.Text = ""
- for i = 1, lin do
- Lines.Text = Lines.Text .. i .. "\n"
- end
- end
- end
- highlight_source("Text")
- Source.Changed:Connect(highlight_source)
- else
- error("You do not own the asset. Please make sure your using the account you bought it with.")
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement