Advertisement
CipRos

fastyes

Jun 27th, 2022
796
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 11.42 KB | None
  1. -- Gui to Lua
  2. -- Version: 3.2
  3.  
  4. -- Instances:
  5.  
  6. local synapsehighlight = Instance.new("ScreenGui")
  7. local EditorFrame = Instance.new("ScrollingFrame")
  8. local Source = Instance.new("TextBox")
  9. local Comments_ = Instance.new("TextLabel")
  10. local Globals_ = Instance.new("TextLabel")
  11. local Keywords_ = Instance.new("TextLabel")
  12. local RemoteHighlight_ = Instance.new("TextLabel")
  13. local Strings_ = Instance.new("TextLabel")
  14. local Tokens_ = Instance.new("TextLabel")
  15. local Numbers_ = Instance.new("TextLabel")
  16. local Lines = Instance.new("TextLabel")
  17. local TextButton = Instance.new("TextButton")
  18.  
  19. --Properties:
  20.  
  21. synapsehighlight.Name = "synapse highlight"
  22. synapsehighlight.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
  23.  
  24. EditorFrame.Name = "EditorFrame"
  25. EditorFrame.Parent = synapsehighlight
  26. EditorFrame.Active = true
  27. EditorFrame.BackgroundColor3 = Color3.fromRGB(37, 37, 37)
  28. EditorFrame.BorderColor3 = Color3.fromRGB(61, 61, 61)
  29. EditorFrame.Position = UDim2.new(0, 147, 0, 109)
  30. EditorFrame.Size = UDim2.new(0, 715, 0, 340)
  31. EditorFrame.BottomImage = "rbxassetid://148970562"
  32. EditorFrame.CanvasSize = UDim2.new(0, 0, 0, 0)
  33. EditorFrame.HorizontalScrollBarInset = Enum.ScrollBarInset.ScrollBar
  34. EditorFrame.MidImage = "rbxassetid://148970562"
  35. EditorFrame.ScrollBarThickness = 5
  36. EditorFrame.TopImage = "rbxassetid://148970562"
  37.  
  38. Source.Name = "Source"
  39. Source.Parent = EditorFrame
  40. Source.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  41. Source.BackgroundTransparency = 1.000
  42. Source.Position = UDim2.new(0, 28, 0, 0)
  43. Source.Size = UDim2.new(0.958389223, 0, 0.90882355, 0)
  44. Source.ZIndex = 3
  45. Source.ClearTextOnFocus = false
  46. Source.Font = Enum.Font.Code
  47. Source.MultiLine = true
  48. Source.PlaceholderColor3 = Color3.fromRGB(204, 204, 204)
  49. Source.Text = "print(\"ya yeet 1 2 3 4 \")"
  50. Source.TextColor3 = Color3.fromRGB(204, 204, 204)
  51. Source.TextSize = 15.000
  52. Source.TextXAlignment = Enum.TextXAlignment.Left
  53. Source.TextYAlignment = Enum.TextYAlignment.Top
  54.  
  55. Comments_.Name = "Comments_"
  56. Comments_.Parent = Source
  57. Comments_.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  58. Comments_.BackgroundTransparency = 1.000
  59. Comments_.Size = UDim2.new(1, 0, 1, 0)
  60. Comments_.ZIndex = 5
  61. Comments_.Font = Enum.Font.Code
  62. Comments_.Text = ""
  63. Comments_.TextColor3 = Color3.fromRGB(153, 153, 153)
  64. Comments_.TextSize = 15.000
  65. Comments_.TextXAlignment = Enum.TextXAlignment.Left
  66. Comments_.TextYAlignment = Enum.TextYAlignment.Top
  67.  
  68. Globals_.Name = "Globals_"
  69. Globals_.Parent = Source
  70. Globals_.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  71. Globals_.BackgroundTransparency = 1.000
  72. Globals_.Size = UDim2.new(1, 0, 1, 0)
  73. Globals_.ZIndex = 5
  74. Globals_.Font = Enum.Font.Code
  75. Globals_.Text = ""
  76. Globals_.TextColor3 = Color3.fromRGB(102, 204, 204)
  77. Globals_.TextSize = 15.000
  78. Globals_.TextXAlignment = Enum.TextXAlignment.Left
  79. Globals_.TextYAlignment = Enum.TextYAlignment.Top
  80.  
  81. Keywords_.Name = "Keywords_"
  82. Keywords_.Parent = Source
  83. Keywords_.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  84. Keywords_.BackgroundTransparency = 1.000
  85. Keywords_.Size = UDim2.new(1, 0, 1, 0)
  86. Keywords_.ZIndex = 5
  87. Keywords_.Font = Enum.Font.Code
  88. Keywords_.Text = ""
  89. Keywords_.TextColor3 = Color3.fromRGB(242, 119, 122)
  90. Keywords_.TextSize = 15.000
  91. Keywords_.TextXAlignment = Enum.TextXAlignment.Left
  92. Keywords_.TextYAlignment = Enum.TextYAlignment.Top
  93.  
  94. RemoteHighlight_.Name = "RemoteHighlight_"
  95. RemoteHighlight_.Parent = Source
  96. RemoteHighlight_.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  97. RemoteHighlight_.BackgroundTransparency = 1.000
  98. RemoteHighlight_.Size = UDim2.new(1, 0, 1, 0)
  99. RemoteHighlight_.ZIndex = 5
  100. RemoteHighlight_.Font = Enum.Font.Code
  101. RemoteHighlight_.Text = ""
  102. RemoteHighlight_.TextColor3 = Color3.fromRGB(102, 153, 204)
  103. RemoteHighlight_.TextSize = 15.000
  104. RemoteHighlight_.TextXAlignment = Enum.TextXAlignment.Left
  105. RemoteHighlight_.TextYAlignment = Enum.TextYAlignment.Top
  106.  
  107. Strings_.Name = "Strings_"
  108. Strings_.Parent = Source
  109. Strings_.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  110. Strings_.BackgroundTransparency = 1.000
  111. Strings_.Size = UDim2.new(1, 0, 1, 0)
  112. Strings_.ZIndex = 5
  113. Strings_.Font = Enum.Font.Code
  114. Strings_.Text = ""
  115. Strings_.TextColor3 = Color3.fromRGB(153, 204, 153)
  116. Strings_.TextSize = 15.000
  117. Strings_.TextXAlignment = Enum.TextXAlignment.Left
  118. Strings_.TextYAlignment = Enum.TextYAlignment.Top
  119.  
  120. Tokens_.Name = "Tokens_"
  121. Tokens_.Parent = Source
  122. Tokens_.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  123. Tokens_.BackgroundTransparency = 1.000
  124. Tokens_.Size = UDim2.new(1, 0, 1, 0)
  125. Tokens_.ZIndex = 5
  126. Tokens_.Font = Enum.Font.Code
  127. Tokens_.Text = ""
  128. Tokens_.TextColor3 = Color3.fromRGB(255, 255, 255)
  129. Tokens_.TextSize = 15.000
  130. Tokens_.TextXAlignment = Enum.TextXAlignment.Left
  131. Tokens_.TextYAlignment = Enum.TextYAlignment.Top
  132.  
  133. Numbers_.Name = "Numbers_"
  134. Numbers_.Parent = Source
  135. Numbers_.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  136. Numbers_.BackgroundTransparency = 1.000
  137. Numbers_.Size = UDim2.new(1, 0, 1, 0)
  138. Numbers_.ZIndex = 4
  139. Numbers_.Font = Enum.Font.Code
  140. Numbers_.Text = ""
  141. Numbers_.TextColor3 = Color3.fromRGB(255, 204, 102)
  142. Numbers_.TextSize = 15.000
  143. Numbers_.TextXAlignment = Enum.TextXAlignment.Left
  144. Numbers_.TextYAlignment = Enum.TextYAlignment.Top
  145.  
  146. Lines.Name = "Lines"
  147. Lines.Parent = EditorFrame
  148. Lines.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  149. Lines.BackgroundTransparency = 1.000
  150. Lines.Size = UDim2.new(-0.00174590689, 30, 0.90882355, 0)
  151. Lines.ZIndex = 4
  152. Lines.Font = Enum.Font.Code
  153. Lines.Text = "1"
  154. Lines.TextColor3 = Color3.fromRGB(255, 255, 255)
  155. Lines.TextSize = 15.000
  156. Lines.TextYAlignment = Enum.TextYAlignment.Top
  157.  
  158. TextButton.Parent = EditorFrame
  159. TextButton.BackgroundColor3 = Color3.fromRGB(18, 18, 18)
  160. TextButton.Position = UDim2.new(0, 0, 0, 309)
  161. TextButton.Size = UDim2.new(0, 200, 0, 30)
  162. TextButton.Font = Enum.Font.SourceSans
  163. TextButton.Text = "Execute"
  164. TextButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  165. TextButton.TextSize = 14.000
  166.  
  167. -- Scripts:
  168.  
  169. local function PNEQHRH_fake_script() -- synapsehighlight.LocalScript
  170.     local script = Instance.new('LocalScript', synapsehighlight)
  171.  
  172.     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", "is_synapse_function","is_protosmasher_caller", "execute","foreach","foreachi","insert","syn","HttpGet","HttpPost","__index","__namecall","__add","__call","__tostring","__tonumber","__div"}
  173.     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","run_secure_function","create_secure_function","hookfunc","hookfunction","newcclosure","replaceclosure","islclosure","getgc","gcinfo","rconsolewarn","rconsoleprint","rconsoleinfo","rconsoleinput","rconsoleinputasync","rconsoleclear","rconsoleerr",}
  174.    
  175.     local src = script.Parent.EditorFrame.Source
  176.     local lin = script.Parent.EditorFrame.Lines
  177.    
  178.     local Highlight = function(string, keywords)
  179.         local K = {}
  180.         local S = string
  181.         local Token =
  182.             {
  183.             ["="] = true,
  184.             ["."] = true,
  185.             [","] = true,
  186.             ["("] = true,
  187.             [")"] = true,
  188.             ["["] = true,
  189.             ["]"] = true,
  190.             ["{"] = true,
  191.             ["}"] = true,
  192.             [":"] = true,
  193.             ["*"] = true,
  194.             ["/"] = true,
  195.             ["+"] = true,
  196.             ["-"] = true,
  197.             ["%"] = true,
  198.             [";"] = true,
  199.             ["~"] = true
  200.         }
  201.         for i, v in pairs(keywords) do
  202.             K[v] = true
  203.         end
  204.         S = S:gsub(".", function(c)
  205.             if Token[c] ~= nil then
  206.                 return "\32"
  207.             else
  208.                 return c
  209.             end
  210.         end)
  211.         S = S:gsub("%S+", function(c)
  212.             if K[c] ~= nil then
  213.                 return c
  214.             else
  215.                 return (" "):rep(#c)
  216.             end
  217.         end)
  218.    
  219.         return S
  220.     end
  221.    
  222.     local hTokens = function(string)
  223.         local Token =
  224.             {
  225.             ["="] = true,
  226.             ["."] = true,
  227.             [","] = true,
  228.             ["("] = true,
  229.             [")"] = true,
  230.             ["["] = true,
  231.             ["]"] = true,
  232.             ["{"] = true,
  233.             ["}"] = true,
  234.             [":"] = true,
  235.             ["*"] = true,
  236.             ["/"] = true,
  237.             ["+"] = true,
  238.             ["-"] = true,
  239.             ["%"] = true,
  240.             [";"] = true,
  241.             ["~"] = true
  242.         }
  243.         local A = ""
  244.         local B = [[]]
  245.         string:gsub(".", function(c)
  246.             if Token[c] ~= nil then
  247.                 A = A .. c
  248.             elseif c == "\n" then
  249.                 A = A .. "\n"
  250.             elseif c == "\t" then
  251.                 A = A .. "\t"
  252.             else
  253.                 A = A .. "\32"
  254.             end
  255.         end)
  256.         return A
  257.     end
  258.    
  259.    
  260.     local strings = function(string)
  261.         local highlight = ""
  262.         local quote = false
  263.         string:gsub(".", function(c)
  264.             if quote == false and c == "\"" then
  265.                 quote = true
  266.             elseif quote == true and c == "\"" then
  267.                 quote = false
  268.             end
  269.             if quote == false and c == "\"" then
  270.                 highlight = highlight .. "\""
  271.             elseif c == "\n" then
  272.                 highlight = highlight .. "\n"
  273.             elseif c == "\t" then
  274.                 highlight = highlight .. "\t"
  275.             elseif quote == true then
  276.                 highlight = highlight .. c
  277.             elseif quote == false then
  278.                 highlight = highlight .. "\32"
  279.             end
  280.         end)
  281.    
  282.         return highlight
  283.     end
  284.    
  285.     local comments = function(string)
  286.         local ret = ""
  287.         string:gsub("[^\r\n]+", function(c)
  288.             local comm = false
  289.             local i = 0
  290.             c:gsub(".", function(n)
  291.                 i = i + 1
  292.                 if c:sub(i, i + 1) == "--" then
  293.                     comm = true
  294.                 end
  295.                 if comm == true then
  296.                     ret = ret .. n
  297.                 else
  298.                     ret = ret .. "\32"
  299.                 end
  300.             end)
  301.             ret = ret
  302.         end)
  303.    
  304.         return ret
  305.     end
  306.    
  307.     local numbers = function(string)
  308.         local A = ""
  309.         string:gsub(".", function(c)
  310.             if tonumber(c) ~= nil then
  311.                 A = A .. c
  312.             elseif c == "\n" then
  313.                 A = A .. "\n"
  314.             elseif c == "\t" then
  315.                 A = A .. "\t"
  316.             else
  317.                 A = A .. "\32"
  318.             end
  319.         end)
  320.    
  321.         return A
  322.     end
  323.    
  324.     local highlight_source = function(type)
  325.         if type == "Text" then
  326.             src.Text = script.Parent.EditorFrame.Source.Text:gsub("\13", "")
  327.             src.Text = script.Parent.EditorFrame.Source.Text:gsub("\t", "      ")
  328.             local s = src.Text
  329.             src.Keywords_.Text = Highlight(s, lua_keywords)
  330.             src.Globals_.Text = Highlight(s, global_env)
  331.             src.RemoteHighlight_.Text = Highlight(s, {"FireServer", "fireServer", "InvokeServer", "invokeServer"})
  332.             src.Tokens_.Text = hTokens(s)
  333.             src.Numbers_.Text = numbers(s)
  334.             src.Strings_.Text = strings(s)
  335.             local lin = 1
  336.             s:gsub("\n", function()
  337.                 lin = lin + 1
  338.             end)
  339.             script.Parent.EditorFrame.Lines.Text = ""
  340.             for i = 1, lin do
  341.                 script.Parent.EditorFrame.Lines.Text = script.Parent.EditorFrame.Lines.Text .. i .. "\n"
  342.             end
  343.         end
  344.     end
  345.    
  346.     highlight_source("Text")
  347.    
  348.     src.Changed:Connect(highlight_source)
  349. end
  350. coroutine.wrap(PNEQHRH_fake_script)()
  351. local function ELDMPUB_fake_script() -- EditorFrame.Script
  352.     local script = Instance.new('Script', EditorFrame)
  353.  
  354.     local btn = script.Parent.TextButton
  355.     local scr = script.Parent.Source
  356.    
  357.     btn.MouseButton1Click:Connect(function()
  358.         assert(loadstring(scr.Text))()
  359.     end)
  360. end
  361. coroutine.wrap(ELDMPUB_fake_script)()
  362.  
Advertisement
RAW Paste Data Copied
Advertisement