Kelsondre69

Untitled

Apr 16th, 2025
8
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.86 KB | None | 0 0
  1. -- EXECUTOR 2.0 Tycoon Game Lua Executor (LocalScript)
  2. -- KRNL-inspired interface
  3.  
  4. local Executor = {}
  5.  
  6. -- Configuration
  7. Executor.Config = {
  8. WindowTitle = "EXECUTOR 2.0 | KRNL Style",
  9. WindowSize = Vector2.new(500, 400),
  10. Theme = {
  11. Background = Color3.fromRGB(30, 30, 40),
  12. Header = Color3.fromRGB(20, 20, 30),
  13. Button = Color3.fromRGB(50, 50, 70),
  14. ButtonHover = Color3.fromRGB(70, 70, 90),
  15. Text = Color3.fromRGB(255, 255, 255),
  16. Error = Color3.fromRGB(255, 50, 50),
  17. Success = Color3.fromRGB(50, 255, 50)
  18. }
  19. }
  20.  
  21. -- Create the main window
  22. function Executor:CreateWindow()
  23. -- Create ScreenGui
  24. local ScreenGui = Instance.new("ScreenGui")
  25. ScreenGui.Name = "Executor2GUI"
  26. ScreenGui.Parent = game:GetService("Players").LocalPlayer:WaitForChild("PlayerGui")
  27.  
  28. -- Main frame
  29. local MainFrame = Instance.new("Frame")
  30. MainFrame.Name = "MainFrame"
  31. MainFrame.Size = UDim2.new(0, self.Config.WindowSize.X, 0, self.Config.WindowSize.Y)
  32. MainFrame.Position = UDim2.new(0.5, -self.Config.WindowSize.X/2, 0.5, -self.Config.WindowSize.Y/2)
  33. MainFrame.BackgroundColor3 = self.Config.Theme.Background
  34. MainFrame.BorderSizePixel = 0
  35. MainFrame.Parent = ScreenGui
  36.  
  37. -- Header
  38. local Header = Instance.new("Frame")
  39. Header.Name = "Header"
  40. Header.Size = UDim2.new(1, 0, 0, 30)
  41. Header.BackgroundColor3 = self.Config.Theme.Header
  42. Header.BorderSizePixel = 0
  43. Header.Parent = MainFrame
  44.  
  45. -- Title
  46. local Title = Instance.new("TextLabel")
  47. Title.Name = "Title"
  48. Title.Text = self.Config.WindowTitle
  49. Title.Size = UDim2.new(1, -10, 1, 0)
  50. Title.Position = UDim2.new(0, 10, 0, 0)
  51. Title.BackgroundTransparency = 1
  52. Title.TextColor3 = self.Config.Theme.Text
  53. Title.TextXAlignment = Enum.TextXAlignment.Left
  54. Title.Font = Enum.Font.GothamBold
  55. Title.Parent = Header
  56.  
  57. -- Close button
  58. local CloseButton = Instance.new("TextButton")
  59. CloseButton.Name = "CloseButton"
  60. CloseButton.Text = "X"
  61. CloseButton.Size = UDim2.new(0, 30, 1, 0)
  62. CloseButton.Position = UDim2.new(1, -30, 0, 0)
  63. CloseButton.BackgroundColor3 = self.Config.Theme.Button
  64. CloseButton.TextColor3 = self.Config.Theme.Text
  65. CloseButton.BorderSizePixel = 0
  66. CloseButton.Font = Enum.Font.GothamBold
  67. CloseButton.Parent = Header
  68.  
  69. CloseButton.MouseButton1Click:Connect(function()
  70. ScreenGui:Destroy()
  71. end)
  72.  
  73. -- Tab buttons
  74. local Tabs = {"Executor", "Script Hub"}
  75. local TabButtons = {}
  76. local TabContent = {}
  77.  
  78. for i, tabName in ipairs(Tabs) do
  79. local TabButton = Instance.new("TextButton")
  80. TabButton.Name = tabName .. "Tab"
  81. TabButton.Text = tabName
  82. TabButton.Size = UDim2.new(0.5, 0, 0, 30)
  83. TabButton.Position = UDim2.new((i-1)*0.5, 0, 0, 30)
  84. TabButton.BackgroundColor3 = self.Config.Theme.Button
  85. TabButton.TextColor3 = self.Config.Theme.Text
  86. TabButton.BorderSizePixel = 0
  87. TabButton.Font = Enum.Font.Gotham
  88. TabButton.Parent = MainFrame
  89.  
  90. local TabFrame = Instance.new("Frame")
  91. TabFrame.Name = tabName .. "Frame"
  92. TabFrame.Size = UDim2.new(1, 0, 1, -60)
  93. TabFrame.Position = UDim2.new(0, 0, 0, 60)
  94. TabFrame.BackgroundTransparency = 1
  95. TabFrame.Visible = i == 1
  96. TabFrame.Parent = MainFrame
  97.  
  98. TabButtons[tabName] = TabButton
  99. TabContent[tabName] = TabFrame
  100.  
  101. TabButton.MouseButton1Click:Connect(function()
  102. for _, frame in pairs(TabContent) do
  103. frame.Visible = false
  104. end
  105. TabFrame.Visible = true
  106. end)
  107. end
  108.  
  109. -- Executor Tab Content
  110. local ExecutorFrame = TabContent["Executor"]
  111.  
  112. -- Script Editor
  113. local Editor = Instance.new("TextBox")
  114. Editor.Name = "Editor"
  115. Editor.Size = UDim2.new(1, -20, 1, -80)
  116. Editor.Position = UDim2.new(0, 10, 0, 10)
  117. Editor.BackgroundColor3 = Color3.fromRGB(40, 40, 50)
  118. Editor.TextColor3 = self.Config.Theme.Text
  119. Editor.Text = "-- Paste your script here\n-- Or type your code"
  120. Editor.ClearTextOnFocus = false
  121. Editor.TextXAlignment = Enum.TextXAlignment.Left
  122. Editor.TextYAlignment = Enum.TextYAlignment.Top
  123. Editor.Font = Enum.Font.Code
  124. Editor.MultiLine = true
  125. Editor.TextWrapped = true
  126. Editor.Parent = ExecutorFrame
  127.  
  128. -- Execute button
  129. local ExecuteButton = Instance.new("TextButton")
  130. ExecuteButton.Name = "ExecuteButton"
  131. ExecuteButton.Text = "EXECUTE"
  132. ExecuteButton.Size = UDim2.new(0, 120, 0, 30)
  133. ExecuteButton.Position = UDim2.new(0.5, -60, 1, -60)
  134. ExecuteButton.BackgroundColor3 = self.Config.Theme.Button
  135. ExecuteButton.TextColor3 = self.Config.Theme.Text
  136. ExecuteButton.Font = Enum.Font.GothamBold
  137. ExecuteButton.Parent = ExecutorFrame
  138.  
  139. -- Status label
  140. local StatusLabel = Instance.new("TextLabel")
  141. StatusLabel.Name = "StatusLabel"
  142. StatusLabel.Size = UDim2.new(1, -20, 0, 20)
  143. StatusLabel.Position = UDim2.new(0, 10, 1, -30)
  144. StatusLabel.BackgroundTransparency = 1
  145. StatusLabel.Text = "Ready"
  146. StatusLabel.TextColor3 = self.Config.Theme.Text
  147. StatusLabel.TextXAlignment = Enum.TextXAlignment.Left
  148. StatusLabel.Font = Enum.Font.Gotham
  149. StatusLabel.Parent = ExecutorFrame
  150.  
  151. -- Execute button functionality
  152. ExecuteButton.MouseButton1Click:Connect(function()
  153. local scriptToExecute = Editor.Text
  154. StatusLabel.Text = "Executing..."
  155. StatusLabel.TextColor3 = self.Config.Theme.Text
  156.  
  157. local success, errorMessage = pcall(function()
  158. local fn, err = loadstring(scriptToExecute)
  159. if fn then
  160. fn()
  161. else
  162. error(err)
  163. end
  164. end)
  165.  
  166. if success then
  167. StatusLabel.Text = "Execution successful!"
  168. StatusLabel.TextColor3 = self.Config.Theme.Success
  169. else
  170. StatusLabel.Text = "Error: " .. tostring(errorMessage)
  171. StatusLabel.TextColor3 = self.Config.Theme.Error
  172. end
  173. end)
  174.  
  175. -- Script Hub Tab Content
  176. local ScriptHubFrame = TabContent["Script Hub"]
  177.  
  178. -- Script list
  179. local ScriptList = Instance.new("ScrollingFrame")
  180. ScriptList.Name = "ScriptList"
  181. ScriptList.Size = UDim2.new(1, -20, 1, -80)
  182. ScriptList.Position = UDim2.new(0, 10, 0, 10)
  183. ScriptList.BackgroundColor3 = Color3.fromRGB(40, 40, 50)
  184. ScriptList.BorderSizePixel = 0
  185. ScriptList.CanvasSize = UDim2.new(0, 0, 0, 0)
  186. ScriptList.AutomaticCanvasSize = Enum.AutomaticSize.Y
  187. ScriptList.ScrollBarThickness = 5
  188. ScriptList.Parent = ScriptHubFrame
  189.  
  190. local UIListLayout = Instance.new("UIListLayout")
  191. UIListLayout.Padding = UDim.new(0, 5)
  192. UIListLayout.Parent = ScriptList
  193.  
  194. -- Example scripts (in a real implementation, you would fetch these from a web source)
  195. local ExampleScripts = {
  196. {
  197. Name = "Infinite Money",
  198. Code = "game:GetService('Players').LocalPlayer.leaderstats.Money.Value = 999999"
  199. },
  200. {
  201. Name = "Speed Hack",
  202. Code = "game:GetService('Players').LocalPlayer.Character.Humanoid.WalkSpeed = 50"
  203. },
  204. {
  205. Name = "Auto Clicker",
  206. Code = "while wait(0.1) do\n -- Your auto click code here\nend"
  207. }
  208. }
  209.  
  210. -- Add script buttons
  211. for _, scriptData in ipairs(ExampleScripts) do
  212. local ScriptButton = Instance.new("TextButton")
  213. ScriptButton.Name = scriptData.Name
  214. ScriptButton.Text = scriptData.Name
  215. ScriptButton.Size = UDim2.new(1, 0, 0, 30)
  216. ScriptButton.BackgroundColor3 = self.Config.Theme.Button
  217. ScriptButton.TextColor3 = self.Config.Theme.Text
  218. ScriptButton.Font = Enum.Font.Gotham
  219. ScriptButton.Parent = ScriptList
  220.  
  221. ScriptButton.MouseButton1Click:Connect(function()
  222. Editor.Text = "-- " .. scriptData.Name .. "\n" .. scriptData.Code
  223. for _, frame in pairs(TabContent) do
  224. frame.Visible = false
  225. end
  226. TabContent["Executor"].Visible = true
  227. end)
  228. end
  229.  
  230. -- Search box
  231. local SearchBox = Instance.new("TextBox")
  232. SearchBox.Name = "SearchBox"
  233. SearchBox.Size = UDim2.new(1, -20, 0, 30)
  234. SearchBox.Position = UDim2.new(0, 10, 1, -60)
  235. SearchBox.BackgroundColor3 = Color3.fromRGB(40, 40, 50)
  236. SearchBox.TextColor3 = self.Config.Theme.Text
  237. SearchBox.PlaceholderText = "Search scripts..."
  238. SearchBox.ClearTextOnFocus = false
  239. SearchBox.Font = Enum.Font.Gotham
  240. SearchBox.Parent = ScriptHubFrame
  241.  
  242. -- Load button for web scripts
  243. local LoadWebButton = Instance.new("TextButton")
  244. LoadWebButton.Name = "LoadWebButton"
  245. LoadWebButton.Text = "LOAD FROM WEB"
  246. LoadWebButton.Size = UDim2.new(1, -20, 0, 30)
  247. LoadWebButton.Position = UDim2.new(0, 10, 1, -25)
  248. LoadWebButton.BackgroundColor3 = self.Config.Theme.Button
  249. LoadWebButton.TextColor3 = self.Config.Theme.Text
  250. LoadWebButton.Font = Enum.Font.GothamBold
  251. LoadWebButton.Parent = ScriptHubFrame
  252.  
  253. LoadWebButton.MouseButton1Click:Connect(function()
  254. StatusLabel.Text = "Loading from web..."
  255. StatusLabel.TextColor3 = self.Config.Theme.Text
  256.  
  257. -- In a real implementation, you would make an HTTP request here
  258. -- For security reasons, this is just a simulation
  259. delay(1, function()
  260. StatusLabel.Text = "Web loading not implemented in this example"
  261. StatusLabel.TextColor3 = self.Config.Theme.Error
  262. end)
  263. end)
  264.  
  265. -- Make window draggable
  266. local UserInputService = game:GetService("UserInputService")
  267. local dragging
  268. local dragInput
  269. local dragStart
  270. local startPos
  271.  
  272. local function update(input)
  273. local delta = input.Position - dragStart
  274. MainFrame.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
  275. end
  276.  
  277. Header.InputBegan:Connect(function(input)
  278. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  279. dragging = true
  280. dragStart = input.Position
  281. startPos = MainFrame.Position
  282.  
  283. input.Changed:Connect(function()
  284. if input.UserInputState == Enum.UserInputState.End then
  285. dragging = false
  286. end
  287. end)
  288. end
  289. end)
  290.  
  291. Header.InputChanged:Connect(function(input)
  292. if input.UserInputType == Enum.UserInputType.MouseMovement then
  293. dragInput = input
  294. end
  295. end)
  296.  
  297. UserInputService.InputChanged:Connect(function(input)
  298. if input == dragInput and dragging then
  299. update(input)
  300. end
  301. end)
  302. end
  303.  
  304. -- Initialize the executor
  305. Executor:CreateWindow()
Add Comment
Please, Sign In to add comment