Advertisement
LynXS_

Executor

Jun 6th, 2024 (edited)
4,276
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 6.32 KB | None | 0 0
  1. --[[
  2.    __ __              __          
  3.   / //_/_____ _____  / /____  ___
  4.  / ,< / __/ // / _ \/ __/ _ \/ _ \
  5. /_/|_/_/  \_, / .__/\__/\___/_//_/
  6.        /___/_/
  7.  
  8. >  -- Made by Chatgpt 3.5 / 4o | Not ratting anyoneπŸ™
  9. ]]
  10. -- Create the ScreenGui
  11. local screenGui = Instance.new("ScreenGui")
  12. screenGui.Name = "ScriptEditorGui"
  13. screenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
  14.  
  15. -- Create the main frame
  16. local mainFrame = Instance.new("Frame")
  17. mainFrame.Size = UDim2.new(0.4, 0, 0.6, 0)
  18. mainFrame.Position = UDim2.new(0.3, 0, 0.2, 0)
  19. mainFrame.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
  20. mainFrame.Parent = screenGui
  21.  
  22. -- Create the top bar
  23. local topBar = Instance.new("Frame")
  24. topBar.Size = UDim2.new(1, 0, 0.1, 0)
  25. topBar.BackgroundColor3 = Color3.fromRGB(80, 80, 80)
  26. topBar.Parent = mainFrame
  27.  
  28. -- Create the label for the top bar
  29. local topBarLabel = Instance.new("TextLabel")
  30. topBarLabel.Size = UDim2.new(0.8, 0, 1, 0)
  31. topBarLabel.Position = UDim2.new(0.1, 0, 0, 0)
  32. topBarLabel.Text = "Krypton"
  33. topBarLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
  34. topBarLabel.BackgroundTransparency = 1
  35. topBarLabel.Parent = topBar
  36.  
  37. -- Create the close button
  38. local closeButton = Instance.new("TextButton")
  39. closeButton.Size = UDim2.new(0.1, 0, 1, 0)
  40. closeButton.Position = UDim2.new(0.9, 0, 0, 0)
  41. closeButton.Text = "X"
  42. closeButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  43. closeButton.BackgroundColor3 = Color3.fromRGB(200, 0, 0) -- Red background for close button
  44. closeButton.Parent = topBar
  45.  
  46. -- Create the open panel button
  47. local openPanelButton = Instance.new("TextButton")
  48. openPanelButton.Size = UDim2.new(0.1, 0, 1, 0)
  49. openPanelButton.Position = UDim2.new(0, 0, 0, 0)
  50. openPanelButton.Text = ">"
  51. openPanelButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  52. openPanelButton.BackgroundColor3 = Color3.fromRGB(0, 128, 0) -- Green background for open panel button
  53. openPanelButton.Parent = topBar
  54.  
  55. -- Create the script editor text box
  56. local scriptEditor = Instance.new("TextBox")
  57. scriptEditor.Size = UDim2.new(1, -20, 0.7, -10)
  58. scriptEditor.Position = UDim2.new(0, 10, 0.1, 10)
  59. scriptEditor.MultiLine = true
  60. scriptEditor.Text = 'print("Hello World!")'
  61. scriptEditor.TextWrapped = true
  62. scriptEditor.TextXAlignment = Enum.TextXAlignment.Left
  63. scriptEditor.TextYAlignment = Enum.TextYAlignment.Top
  64. scriptEditor.TextColor3 = Color3.fromRGB(255, 255, 255)
  65. scriptEditor.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
  66. scriptEditor.Parent = mainFrame
  67.  
  68. -- Create the execute button
  69. local executeButton = Instance.new("TextButton")
  70. executeButton.Size = UDim2.new(0.3, 0, 0.1, 0)
  71. executeButton.Position = UDim2.new(0.05, 0, 0.85, 0)
  72. executeButton.Text = "Execute"
  73. executeButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  74. executeButton.BackgroundColor3 = Color3.fromRGB(80, 0, 128)
  75. executeButton.Parent = mainFrame
  76.  
  77. -- Create the clear button
  78. local clearButton = Instance.new("TextButton")
  79. clearButton.Size = UDim2.new(0.3, 0, 0.1, 0)
  80. clearButton.Position = UDim2.new(0.65, 0, 0.85, 0)
  81. clearButton.Text = "Clear Editor"
  82. clearButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  83. clearButton.BackgroundColor3 = Color3.fromRGB(128, 0, 0)
  84. clearButton.Parent = mainFrame
  85.  
  86. -- Create the panel
  87. local panel = Instance.new("Frame")
  88. panel.Size = UDim2.new(0.4, 0, 0.6, 0)
  89. panel.Position = UDim2.new(1, 0, 0.2, 0)
  90. panel.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
  91. panel.Visible = false
  92. panel.Parent = screenGui
  93.  
  94. -- Create the load button inside the panel
  95. local loadButton = Instance.new("TextButton")
  96. loadButton.Size = UDim2.new(0.5, 0, 0.5, 0)
  97. loadButton.Position = UDim2.new(0.25, 0, 0.25, 0)
  98. loadButton.Text = "Load to Executor"
  99. loadButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  100. loadButton.BackgroundColor3 = Color3.fromRGB(0, 128, 128) -- Teal background for load button
  101. loadButton.Parent = panel
  102.  
  103. -- Function to execute the script
  104. local function executeScript()
  105.     local scriptText = scriptEditor.Text
  106.     local success, message = pcall(function()
  107.         loadstring(scriptText)()
  108.     end)
  109.     if not success then
  110.         warn("Error executing script: " .. message)
  111.     end
  112. end
  113.  
  114. -- Function to clear the script editor
  115. local function clearEditor()
  116.     scriptEditor.Text = ""
  117. end
  118.  
  119. -- Function to close the entire UI
  120. local function closeUI()
  121.     screenGui:Destroy()
  122. end
  123.  
  124. -- Function to open the panel
  125. local function openPanel()
  126.     if not panel.Visible then
  127.         panel.Visible = true
  128.         panel:TweenPosition(UDim2.new(0.6, 0, 0.2, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Quart, 0.5, true)
  129.     else
  130.         panel.Visible = false
  131.         panel:TweenPosition(UDim2.new(1, 0, 0.2, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Quart, 0.5, true)
  132.     end
  133. end
  134.  
  135. -- Function to load text from clipboard
  136. local function loadText()
  137.     local clipboardText = game:GetService("GuiService"):GetClipboard()
  138.     scriptEditor.Text = clipboardText
  139. end
  140.  
  141. -- Function to toggle UI visibility
  142. local function toggleUIVisibility()
  143.     screenGui.Enabled = not screenGui.Enabled
  144. end
  145.  
  146. -- Event listener for right shift key press
  147. game:GetService("UserInputService").InputBegan:Connect(function(input)
  148.     if input.KeyCode == Enum.KeyCode.RightShift then
  149.         toggleUIVisibility()
  150.     end
  151. end)
  152.  
  153. -- Connect the buttons to their functions
  154. executeButton.MouseButton1Click:Connect(executeScript)
  155. clearButton.MouseButton1Click:Connect(clearEditor)
  156. closeButton.MouseButton1Click:Connect(closeUI)
  157. openPanelButton.MouseButton1Click:Connect(openPanel)
  158. loadButton.MouseButton1Click:Connect(loadText)
  159.  
  160. -- Floating Button for toggle
  161. local ScreenGui = Instance.new("ScreenGui")
  162. ScreenGui.Name = "ScreenGui"
  163. ScreenGui.Parent = game:GetService("Players").LocalPlayer:WaitForChild("PlayerGui")
  164. ScreenGui.ResetOnSpawn = false
  165. local Toggle = Instance.new("TextButton")
  166. Toggle.Name = "Toggle"
  167. Toggle.Parent = ScreenGui
  168. Toggle.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
  169. Toggle.Position = UDim2.new(0, 0, 0.454706937, 0)
  170. Toggle.Size = UDim2.new(0, 90, 0, 38)
  171. Toggle.Font = Enum.Font.SourceSans
  172. Toggle.Text = "Toggle"
  173. Toggle.TextColor3 = Color3.fromRGB(248, 248, 248)
  174. Toggle.TextSize = 28.000
  175. Toggle.Draggable = true
  176. Toggle.MouseButton1Click:connect(function()
  177.     game:GetService("VirtualInputManager"):SendKeyEvent(true,Enum.KeyCode.RightShift,false,game)
  178. end)
  179. local Corner = Instance.new("UICorner")
  180. Corner.Name = "Corner"
  181. Corner.Parent = ToggleUI
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement