Advertisement
Hellotop2

AtlisExecutor

Jan 20th, 2019
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.33 KB | None | 0 0
  1. print("message test kthx")
  2. -- Objects
  3.  
  4. local AtlisScriptExecutor = Instance.new("ScreenGui")
  5. local Top = Instance.new("Frame")
  6. local EditorFrame = Instance.new("ScrollingFrame")
  7. local Source = Instance.new("TextBox")
  8. local Comments_ = Instance.new("TextLabel")
  9. local Globals_ = Instance.new("TextLabel")
  10. local Keywords_ = Instance.new("TextLabel")
  11. local RemoteHighlight_ = Instance.new("TextLabel")
  12. local Strings_ = Instance.new("TextLabel")
  13. local Tokens_ = Instance.new("TextLabel")
  14. local Numbers_ = Instance.new("TextLabel")
  15. local Lines = Instance.new("TextLabel")
  16. local CloseButton = Instance.new("TextButton")
  17. local MinButton = Instance.new("TextButton")
  18. local ex = Instance.new("TextButton")
  19. local cl = Instance.new("TextButton")
  20. local openbutton = Instance.new("TextButton")
  21.  
  22. -- Properties
  23.  
  24. AtlisScriptExecutor.Name = "AtlisScriptExecutor"
  25. AtlisScriptExecutor.Parent = game.CoreGui
  26.  
  27. Top.Name = "Top"
  28. Top.Parent = AtlisScriptExecutor
  29. Top.BackgroundColor3 = Color3.new(0.321569, 1, 0.627451)
  30. Top.BorderSizePixel = 0
  31. Top.Position = UDim2.new(0.165832296, 0, 0.16625616, 0)
  32. Top.Size = UDim2.new(0, 631, 0, 47)
  33.  
  34. EditorFrame.Name = "EditorFrame"
  35. EditorFrame.Parent = Top
  36. EditorFrame.BackgroundColor3 = Color3.new(0.145098, 0.145098, 0.145098)
  37. EditorFrame.BorderColor3 = Color3.new(0.243137, 0.243137, 0.243137)
  38. EditorFrame.Position = UDim2.new(0, 0, 0, 47)
  39. EditorFrame.Size = UDim2.new(0, 631, 0, 337)
  40. EditorFrame.ZIndex = 3
  41. EditorFrame.BottomImage = "rbxassetid://148970562"
  42. EditorFrame.CanvasSize = UDim2.new(0, 0, 0, 0)
  43. EditorFrame.HorizontalScrollBarInset = Enum.ScrollBarInset.ScrollBar
  44. EditorFrame.MidImage = "rbxassetid://148970562"
  45. EditorFrame.ScrollBarThickness = 5
  46. EditorFrame.TopImage = "rbxassetid://148970562"
  47.  
  48. Source.Name = "Source"
  49. Source.Parent = EditorFrame
  50. Source.BackgroundColor3 = Color3.new(1, 1, 1)
  51. Source.BackgroundTransparency = 1
  52. Source.Position = UDim2.new(0, 30, 0, 0)
  53. Source.Size = UDim2.new(1, 0, 1, 0)
  54. Source.ZIndex = 3
  55. Source.ClearTextOnFocus = false
  56. Source.Font = Enum.Font.Code
  57. Source.MultiLine = true
  58. Source.PlaceholderColor3 = Color3.new(0.8, 0.8, 0.8)
  59. Source.Text = "print(\"Not all scripts will work\")\nprint(\"Script obfuscator coming soon.\")"
  60. Source.TextColor3 = Color3.new(0.8, 0.8, 0.8)
  61. Source.TextSize = 15
  62. Source.TextWrapped = true
  63. Source.TextXAlignment = Enum.TextXAlignment.Left
  64. Source.TextYAlignment = Enum.TextYAlignment.Top
  65.  
  66. Comments_.Name = "Comments_"
  67. Comments_.Parent = Source
  68. Comments_.BackgroundColor3 = Color3.new(1, 1, 1)
  69. Comments_.BackgroundTransparency = 1
  70. Comments_.Size = UDim2.new(1, 0, 1, 0)
  71. Comments_.ZIndex = 5
  72. Comments_.Font = Enum.Font.Code
  73. Comments_.Text = ""
  74. Comments_.TextColor3 = Color3.new(0.231373, 0.784314, 0.231373)
  75. Comments_.TextSize = 15
  76. Comments_.TextXAlignment = Enum.TextXAlignment.Left
  77. Comments_.TextYAlignment = Enum.TextYAlignment.Top
  78.  
  79. Globals_.Name = "Globals_"
  80. Globals_.Parent = Source
  81. Globals_.BackgroundColor3 = Color3.new(1, 1, 1)
  82. Globals_.BackgroundTransparency = 1
  83. Globals_.Size = UDim2.new(1, 0, 1, 0)
  84. Globals_.ZIndex = 5
  85. Globals_.Font = Enum.Font.Code
  86. Globals_.Text = ""
  87. Globals_.TextColor3 = Color3.new(0.517647, 0.839216, 0.968628)
  88. Globals_.TextSize = 15
  89. Globals_.TextXAlignment = Enum.TextXAlignment.Left
  90. Globals_.TextYAlignment = Enum.TextYAlignment.Top
  91.  
  92. Keywords_.Name = "Keywords_"
  93. Keywords_.Parent = Source
  94. Keywords_.BackgroundColor3 = Color3.new(1, 1, 1)
  95. Keywords_.BackgroundTransparency = 1
  96. Keywords_.Size = UDim2.new(1, 0, 1, 0)
  97. Keywords_.ZIndex = 5
  98. Keywords_.Font = Enum.Font.Code
  99. Keywords_.Text = ""
  100. Keywords_.TextColor3 = Color3.new(0.972549, 0.427451, 0.486275)
  101. Keywords_.TextSize = 15
  102. Keywords_.TextXAlignment = Enum.TextXAlignment.Left
  103. Keywords_.TextYAlignment = Enum.TextYAlignment.Top
  104.  
  105. RemoteHighlight_.Name = "RemoteHighlight_"
  106. RemoteHighlight_.Parent = Source
  107. RemoteHighlight_.BackgroundColor3 = Color3.new(1, 1, 1)
  108. RemoteHighlight_.BackgroundTransparency = 1
  109. RemoteHighlight_.Size = UDim2.new(1, 0, 1, 0)
  110. RemoteHighlight_.ZIndex = 5
  111. RemoteHighlight_.Font = Enum.Font.Code
  112. RemoteHighlight_.Text = ""
  113. RemoteHighlight_.TextColor3 = Color3.new(0, 0.568627, 1)
  114. RemoteHighlight_.TextSize = 15
  115. RemoteHighlight_.TextXAlignment = Enum.TextXAlignment.Left
  116. RemoteHighlight_.TextYAlignment = Enum.TextYAlignment.Top
  117.  
  118. Strings_.Name = "Strings_"
  119. Strings_.Parent = Source
  120. Strings_.BackgroundColor3 = Color3.new(1, 1, 1)
  121. Strings_.BackgroundTransparency = 1
  122. Strings_.Size = UDim2.new(1, 0, 1, 0)
  123. Strings_.ZIndex = 5
  124. Strings_.Font = Enum.Font.Code
  125. Strings_.Text = ""
  126. Strings_.TextColor3 = Color3.new(0.678431, 0.945098, 0.584314)
  127. Strings_.TextSize = 15
  128. Strings_.TextXAlignment = Enum.TextXAlignment.Left
  129. Strings_.TextYAlignment = Enum.TextYAlignment.Top
  130.  
  131. Tokens_.Name = "Tokens_"
  132. Tokens_.Parent = Source
  133. Tokens_.BackgroundColor3 = Color3.new(1, 1, 1)
  134. Tokens_.BackgroundTransparency = 1
  135. Tokens_.Size = UDim2.new(1, 0, 1, 0)
  136. Tokens_.ZIndex = 5
  137. Tokens_.Font = Enum.Font.Code
  138. Tokens_.Text = ""
  139. Tokens_.TextColor3 = Color3.new(1, 1, 1)
  140. Tokens_.TextSize = 15
  141. Tokens_.TextXAlignment = Enum.TextXAlignment.Left
  142. Tokens_.TextYAlignment = Enum.TextYAlignment.Top
  143.  
  144. Numbers_.Name = "Numbers_"
  145. Numbers_.Parent = Source
  146. Numbers_.BackgroundColor3 = Color3.new(1, 1, 1)
  147. Numbers_.BackgroundTransparency = 1
  148. Numbers_.Size = UDim2.new(1, 0, 1, 0)
  149. Numbers_.ZIndex = 4
  150. Numbers_.Font = Enum.Font.Code
  151. Numbers_.Text = ""
  152. Numbers_.TextColor3 = Color3.new(1, 0.776471, 0)
  153. Numbers_.TextSize = 15
  154. Numbers_.TextXAlignment = Enum.TextXAlignment.Left
  155. Numbers_.TextYAlignment = Enum.TextYAlignment.Top
  156.  
  157. Lines.Name = "Lines"
  158. Lines.Parent = EditorFrame
  159. Lines.BackgroundColor3 = Color3.new(1, 1, 1)
  160. Lines.BackgroundTransparency = 1
  161. Lines.Size = UDim2.new(0, 30, 1, 0)
  162. Lines.ZIndex = 4
  163. Lines.Font = Enum.Font.Code
  164. Lines.Text = "1"
  165. Lines.TextColor3 = Color3.new(1, 1, 1)
  166. Lines.TextSize = 15
  167. Lines.TextYAlignment = Enum.TextYAlignment.Top
  168.  
  169. CloseButton.Name = "CloseButton"
  170. CloseButton.Parent = Top
  171. CloseButton.BackgroundColor3 = Color3.new(1, 1, 1)
  172. CloseButton.BackgroundTransparency = 1
  173. CloseButton.Position = UDim2.new(0.900158465, 0, -0.0425531901, 0)
  174. CloseButton.Size = UDim2.new(0, 66, 0, 49)
  175. CloseButton.Font = Enum.Font.SourceSans
  176. CloseButton.Text = "X"
  177. CloseButton.TextColor3 = Color3.new(0, 0, 0)
  178. CloseButton.TextScaled = true
  179. CloseButton.TextSize = 14
  180. CloseButton.TextWrapped = true
  181.  
  182. MinButton.Name = "MinButton"
  183. MinButton.Parent = Top
  184. MinButton.BackgroundColor3 = Color3.new(1, 1, 1)
  185. MinButton.BackgroundTransparency = 1
  186. MinButton.Position = UDim2.new(0.839936614, 0, 0, 0)
  187. MinButton.Size = UDim2.new(0, 66, 0, 49)
  188. MinButton.Font = Enum.Font.SourceSans
  189. MinButton.Text = "-"
  190. MinButton.TextColor3 = Color3.new(0, 0, 0)
  191. MinButton.TextScaled = true
  192. MinButton.TextSize = 14
  193. MinButton.TextWrapped = true
  194.  
  195. ex.Name = "ex"
  196. ex.Parent = Top
  197. ex.BackgroundColor3 = Color3.new(1, 1, 1)
  198. ex.BorderSizePixel = 0
  199. ex.Position = UDim2.new(0, 0, 8.17021275, 0)
  200. ex.Size = UDim2.new(0, 200, 0, 50)
  201. ex.Font = Enum.Font.SourceSans
  202. ex.Text = "Execute"
  203. ex.TextColor3 = Color3.new(0, 0, 0)
  204. ex.TextScaled = true
  205. ex.TextSize = 14
  206. ex.TextWrapped = true
  207.  
  208. cl.Name = "cl"
  209. cl.Parent = Top
  210. cl.BackgroundColor3 = Color3.new(1, 1, 1)
  211. cl.BorderSizePixel = 0
  212. cl.Position = UDim2.new(0.683042765, 0, 8.17021275, 0)
  213. cl.Size = UDim2.new(0, 200, 0, 50)
  214. cl.Font = Enum.Font.SourceSans
  215. cl.Text = "Clear"
  216. cl.TextColor3 = Color3.new(0, 0, 0)
  217. cl.TextScaled = true
  218. cl.TextSize = 14
  219. cl.TextWrapped = true
  220.  
  221. openbutton.Name = "openbutton"
  222. openbutton.Parent = AtlisScriptExecutor
  223. openbutton.BackgroundColor3 = Color3.new(1, 1, 1)
  224. openbutton.BorderSizePixel = 0
  225. openbutton.Position = UDim2.new(0, 0, 0.359605908, 0)
  226. openbutton.Size = UDim2.new(0, 200, 0, 50)
  227. openbutton.Visible = false
  228. openbutton.Font = Enum.Font.SourceSans
  229. openbutton.Text = "Open"
  230. openbutton.TextColor3 = Color3.new(0, 0, 0)
  231. openbutton.TextScaled = true
  232. openbutton.TextSize = 14
  233. openbutton.TextWrapped = true
  234. local UserInputService,gui,dragging,dragInput,dragStart,startPos = game:GetService("UserInputService"),Top
  235.  
  236. local function update(input)
  237. local delta = input.Position - dragStart
  238. wait(0.1)
  239. gui.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
  240. end
  241.  
  242. gui.InputBegan:Connect(function(input)
  243. if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
  244. dragging = true
  245. dragStart = input.Position
  246. startPos = gui.Position
  247.  
  248. input.Changed:Connect(function()
  249. if input.UserInputState == Enum.UserInputState.End then
  250. dragging = false
  251. end
  252. end)
  253. end
  254. end)
  255.  
  256. gui.InputChanged:Connect(function(input)
  257. if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then
  258. dragInput = input
  259. end
  260. end)
  261.  
  262. UserInputService.InputChanged:Connect(function(input)
  263. if input == dragInput and dragging then
  264. update(input)
  265. end
  266. end)
  267. ex.MouseButton1Click:Connect(function()
  268. loadstring(Source.Text)()
  269. end)
  270. cl.MouseButton1Click:Connect(function()
  271. Source.Text = ""
  272. end)
  273.  
  274. MinButton.MouseButton1Click:Connect(function()
  275. Top.Visible = false
  276. openbutton.Visible = true
  277. end)
  278.  
  279. CloseButton.MouseButton1Click:Connect(function()
  280. AtlisScriptExecutor:Destroy()
  281. end)
  282. 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"}
  283. 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"}
  284.  
  285. local Source = Source
  286. local Lines = Lines
  287.  
  288. local Highlight = function(string, keywords)
  289. local K = {}
  290. local S = string
  291. local Token =
  292. {
  293. ["="] = true,
  294. ["."] = true,
  295. [","] = true,
  296. ["("] = true,
  297. [")"] = true,
  298. ["["] = true,
  299. ["]"] = true,
  300. ["{"] = true,
  301. ["}"] = true,
  302. [":"] = true,
  303. ["*"] = true,
  304. ["/"] = true,
  305. ["+"] = true,
  306. ["-"] = true,
  307. ["%"] = true,
  308. [";"] = true,
  309. ["~"] = true
  310. }
  311. for i, v in pairs(keywords) do
  312. K[v] = true
  313. end
  314. S = S:gsub(".", function(c)
  315. if Token[c] ~= nil then
  316. return "\32"
  317. else
  318. return c
  319. end
  320. end)
  321. S = S:gsub("%S+", function(c)
  322. if K[c] ~= nil then
  323. return c
  324. else
  325. return (" "):rep(#c)
  326. end
  327. end)
  328.  
  329. return S
  330. end
  331.  
  332. local hTokens = function(string)
  333. local Token =
  334. {
  335. ["="] = true,
  336. ["."] = true,
  337. [","] = true,
  338. ["("] = true,
  339. [")"] = true,
  340. ["["] = true,
  341. ["]"] = true,
  342. ["{"] = true,
  343. ["}"] = true,
  344. [":"] = true,
  345. ["*"] = true,
  346. ["/"] = true,
  347. ["+"] = true,
  348. ["-"] = true,
  349. ["%"] = true,
  350. [";"] = true,
  351. ["~"] = true
  352. }
  353. local A = ""
  354. string:gsub(".", function(c)
  355. if Token[c] ~= nil then
  356. A = A .. c
  357. elseif c == "\n" then
  358. A = A .. "\n"
  359. elseif c == "\t" then
  360. A = A .. "\t"
  361. else
  362. A = A .. "\32"
  363. end
  364. end)
  365.  
  366. return A
  367. end
  368.  
  369.  
  370. local strings = function(string)
  371. local highlight = ""
  372. local quote = false
  373. string:gsub(".", function(c)
  374. if quote == false and c == "\"" then
  375. quote = true
  376. elseif quote == true and c == "\"" then
  377. quote = false
  378. end
  379. if quote == false and c == "\"" then
  380. highlight = highlight .. "\""
  381. elseif c == "\n" then
  382. highlight = highlight .. "\n"
  383. elseif c == "\t" then
  384. highlight = highlight .. "\t"
  385. elseif quote == true then
  386. highlight = highlight .. c
  387. elseif quote == false then
  388. highlight = highlight .. "\32"
  389. end
  390. end)
  391.  
  392. return highlight
  393. end
  394.  
  395. local comments = function(string)
  396. local ret = ""
  397. string:gsub("[^\r\n]+", function(c)
  398. local comm = false
  399. local i = 0
  400. c:gsub(".", function(n)
  401. i = i + 1
  402. if c:sub(i, i + 1) == "--" then
  403. comm = true
  404. end
  405. if comm == true then
  406. ret = ret .. n
  407. else
  408. ret = ret .. "\32"
  409. end
  410. end)
  411. ret = ret
  412. end)
  413.  
  414. return ret
  415. end
  416.  
  417. local numbers = function(string)
  418. local A = ""
  419. string:gsub(".", function(c)
  420. if tonumber(c) ~= nil then
  421. A = A .. c
  422. elseif c == "\n" then
  423. A = A .. "\n"
  424. elseif c == "\t" then
  425. A = A .. "\t"
  426. else
  427. A = A .. "\32"
  428. end
  429. end)
  430.  
  431. return A
  432. end
  433.  
  434. local highlight_source = function(type)
  435. if type == "Text" then
  436. Source.Text = Source.Text:gsub("\13", "")
  437. Source.Text = Source.Text:gsub("\t", " ")
  438. local s = Source.Text
  439. Source.Keywords_.Text = Highlight(s, lua_keywords)
  440. Source.Globals_.Text = Highlight(s, global_env)
  441. Source.RemoteHighlight_.Text = Highlight(s, {"FireServer", "fireServer", "InvokeServer", "invokeServer"})
  442. Source.Tokens_.Text = hTokens(s)
  443. Source.Numbers_.Text = numbers(s)
  444. Source.Strings_.Text = strings(s)
  445. local lin = 1
  446. s:gsub("\n", function()
  447. lin = lin + 1
  448. end)
  449. Lines.Text = ""
  450. for i = 1, lin do
  451. Lines.Text = Lines.Text .. i .. "\n"
  452. end
  453. end
  454. end
  455.  
  456. highlight_source("Text")
  457.  
  458. Source.Changed:Connect(highlight_source)
  459.  
  460. openbutton.MouseButton1Click:Connect(function()
  461. Top.Visible = true
  462. openbutton.Visible = false
  463. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement