dkg_yt

protosmasher gui made by autist69420#3301

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