asdasdaaa11

lua exec script

May 5th, 2018
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.26 KB | None | 0 0
  1. --click to go on a new line
  2. gui = Instance.new("ScreenGui",game.CoreGui)
  3. gui.Name = "ScriptExecutor"
  4. gui.ResetOnSpawn = false
  5.  
  6. box = Instance.new("Frame",gui)
  7. box.Name = "Box"
  8. box.Size = UDim2.new(0,400,0,400)
  9. box.BackgroundColor3 = Color3.new(255,255,255)
  10. box.BackgroundTransparency = .25
  11. box.BorderColor3 = Color3.new(0,0,0)
  12. box.Active = true
  13. box.Draggable = true
  14.  
  15. lab = Instance.new("TextLabel",box)
  16. lab.Name = "TopBar"
  17. lab.Size = UDim2.new(0,400,0,35)
  18. lab.BackgroundColor3 = Color3.new(255,255,255)
  19. lab.BackgroundTransparency = .2
  20. lab.BorderSizePixel = 0
  21. lab.Font = "Code"
  22. lab.FontSize = "Size24"
  23. lab.Text = "Script Executor"
  24. lab.TextColor3 = Color3.new(0,0,0)
  25.  
  26. scroll = Instance.new("ScrollingFrame",box)
  27. scroll.Size = UDim2.new(0,400,0,315)
  28. scroll.Position = UDim2.new(0,0,0,35)
  29. scroll.BackgroundTransparency = 1
  30. scroll.ScrollBarThickness = 0
  31. scroll.CanvasSize = UDim2.new(0,0,900,0)
  32.  
  33. text = Instance.new("TextBox",scroll)
  34. text.Name = "Script"
  35. text.Size = UDim2.new(0,400,0,10000)
  36. text.BackgroundColor3 = Color3.new(255,255,255)
  37. text.BackgroundTransparency = .5
  38. text.BorderColor3 = Color3.new(0,0,0)
  39. text.ClearTextOnFocus = false
  40. text.Font = "Code"
  41. text.FontSize = "Size14"
  42. text.Text = "Insert Script Here"
  43. text.TextColor3 = Color3.new(0,0,0)
  44. text.TextWrapped = true
  45. text.TextXAlignment = "Left"
  46. text.TextYAlignment = "Top"
  47.  
  48. text.Focused:connect(function(enterPressed)
  49. text.Text = text.Text.."\n"
  50. end)
  51.  
  52. clear = Instance.new("TextButton",box)
  53. clear.Name = "ClearButton"
  54. clear.Size = UDim2.new(0,200,0,50)
  55. clear.Position = UDim2.new(0,0,0,350)
  56. clear.BackgroundColor3 = Color3.new(255,255,255)
  57. clear.BackgroundTransparency = .3
  58. clear.BorderSizePixel = 0
  59. clear.Font = "Code"
  60. clear.FontSize = "Size24"
  61. clear.Text = "Clear"
  62. clear.TextColor3 = Color3.new(0,0,0)
  63.  
  64. clear.MouseButton1Down:connect(function()
  65. text.Text = ""
  66. end)
  67.  
  68. exe = Instance.new("TextButton",box)
  69. exe.Name = "ExecuteButton"
  70. exe.Size = UDim2.new(0,200,0,50)
  71. exe.Position = UDim2.new(0,200,0,350)
  72. exe.BackgroundColor3 = Color3.new(255,255,255)
  73. exe.BackgroundTransparency = .3
  74. exe.BorderSizePixel = 0
  75. exe.Font = "Code"
  76. exe.FontSize = "Size24"
  77. exe.Text = "Execute"
  78. exe.TextColor3 = Color3.new(0,0,0)
  79.  
  80. exe.MouseButton1Down:connect(function()
  81. loadstring(text.Text)()
  82. end)
Add Comment
Please, Sign In to add comment