Advertisement
Kelsondre69

Untitled

Apr 16th, 2025
24
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.31 KB | None | 0 0
  1. -- KRNL-Style Executor for EXECUTOR 2.0 Tycoon
  2. -- LocalScript version with toggle button
  3.  
  4. local Player = game:GetService("Players").LocalPlayer
  5. local PlayerGui = Player:WaitForChild("PlayerGui")
  6.  
  7. -- Main GUI Container
  8. local ScreenGui = Instance.new("ScreenGui")
  9. ScreenGui.Name = "KRNLStyleExecutor"
  10. ScreenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  11. ScreenGui.Parent = PlayerGui
  12.  
  13. -- Toggle Button (Bottom right corner)
  14. local ToggleButton = Instance.new("TextButton")
  15. ToggleButton.Name = "ToggleButton"
  16. ToggleButton.Text = "-"
  17. ToggleButton.Size = UDim2.new(0, 40, 0, 30)
  18. ToggleButton.Position = UDim2.new(1, -45, 1, -40)
  19. ToggleButton.AnchorPoint = Vector2.new(1, 1)
  20. ToggleButton.BackgroundColor3 = Color3.fromRGB(30, 30, 40)
  21. ToggleButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  22. ToggleButton.Font = Enum.Font.GothamBold
  23. ToggleButton.TextSize = 20
  24. ToggleButton.BorderSizePixel = 0
  25. ToggleButton.ZIndex = 2
  26. ToggleButton.Parent = ScreenGui
  27.  
  28. -- Main Frame (Hidden by default)
  29. local MainFrame = Instance.new("Frame")
  30. MainFrame.Name = "MainFrame"
  31. MainFrame.Size = UDim2.new(0, 500, 0, 350)
  32. MainFrame.Position = UDim2.new(0.5, -250, 0.5, -175)
  33. MainFrame.BackgroundColor3 = Color3.fromRGB(25, 25, 30)
  34. MainFrame.BorderSizePixel = 0
  35. MainFrame.Visible = false
  36. MainFrame.ZIndex = 2
  37. MainFrame.Parent = ScreenGui
  38.  
  39. -- KRNL Header
  40. local Header = Instance.new("Frame")
  41. Header.Name = "Header"
  42. Header.Size = UDim2.new(1, 0, 0, 30)
  43. Header.BackgroundColor3 = Color3.fromRGB(20, 20, 25)
  44. Header.BorderSizePixel = 0
  45. Header.ZIndex = 3
  46. Header.Parent = MainFrame
  47.  
  48. -- KRNL Logo
  49. local Logo = Instance.new("ImageLabel")
  50. Logo.Name = "Logo"
  51. Logo.Size = UDim2.new(0, 100, 0, 20)
  52. Logo.Position = UDim2.new(0, 10, 0.5, -10)
  53. Logo.BackgroundTransparency = 1
  54. Logo.Image = "rbxassetid://YOUR_LOGO_IMAGE_ID" -- Replace with actual KRNL logo ID
  55. Logo.ZIndex = 4
  56. Logo.Parent = Header
  57.  
  58. -- Close Button
  59. local CloseButton = Instance.new("TextButton")
  60. CloseButton.Name = "CloseButton"
  61. CloseButton.Text = "X"
  62. CloseButton.Size = UDim2.new(0, 30, 1, 0)
  63. CloseButton.Position = UDim2.new(1, -30, 0, 0)
  64. CloseButton.BackgroundColor3 = Color3.fromRGB(40, 40, 50)
  65. CloseButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  66. CloseButton.Font = Enum.Font.GothamBold
  67. CloseButton.ZIndex = 4
  68. CloseButton.Parent = Header
  69.  
  70. -- Tab Buttons
  71. local Tabs = {"Home", "Scripts", "Settings"}
  72. local TabButtons = {}
  73. local TabFrames = {}
  74.  
  75. for i, tabName in ipairs(Tabs) do
  76. local TabButton = Instance.new("TextButton")
  77. TabButton.Name = tabName.."Tab"
  78. TabButton.Text = tabName
  79. TabButton.Size = UDim2.new(0.33, -2, 0, 30)
  80. TabButton.Position = UDim2.new((i-1)*0.33, 0, 0, 30)
  81. TabButton.BackgroundColor3 = i == 1 and Color3.fromRGB(40, 40, 50) or Color3.fromRGB(30, 30, 40)
  82. TabButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  83. TabButton.Font = Enum.Font.Gotham
  84. TabButton.ZIndex = 3
  85. TabButton.Parent = MainFrame
  86.  
  87. local TabFrame = Instance.new("Frame")
  88. TabFrame.Name = tabName.."Frame"
  89. TabFrame.Size = UDim2.new(1, 0, 1, -60)
  90. TabFrame.Position = UDim2.new(0, 0, 0, 60)
  91. TabFrame.BackgroundTransparency = 1
  92. TabFrame.Visible = i == 1
  93. TabFrame.ZIndex = 2
  94. TabFrame.Parent = MainFrame
  95.  
  96. TabButtons[tabName] = TabButton
  97. TabFrames[tabName] = TabFrame
  98.  
  99. TabButton.MouseButton1Click:Connect(function()
  100. for _, btn in pairs(TabButtons) do
  101. btn.BackgroundColor3 = Color3.fromRGB(30, 30, 40)
  102. end
  103. TabButton.BackgroundColor3 = Color3.fromRGB(40, 40, 50)
  104.  
  105. for _, frame in pairs(TabFrames) do
  106. frame.Visible = false
  107. end
  108. TabFrame.Visible = true
  109. end)
  110. end
  111.  
  112. -- Home Tab Content
  113. local HomeFrame = TabFrames["Home"]
  114.  
  115. -- Script Editor
  116. local Editor = Instance.new("ScrollingFrame")
  117. Editor.Name = "Editor"
  118. Editor.Size = UDim2.new(1, -20, 1, -100)
  119. Editor.Position = UDim2.new(0, 10, 0, 10)
  120. Editor.BackgroundColor3 = Color3.fromRGB(20, 20, 25)
  121. Editor.BorderSizePixel = 0
  122. Editor.ScrollBarThickness = 5
  123. Editor.ZIndex = 3
  124. Editor.Parent = HomeFrame
  125.  
  126. local EditorTextBox = Instance.new("TextBox")
  127. EditorTextBox.Name = "EditorTextBox"
  128. EditorTextBox.Size = UDim2.new(1, -10, 1, -10)
  129. EditorTextBox.Position = UDim2.new(0, 5, 0, 5)
  130. EditorTextBox.BackgroundTransparency = 1
  131. EditorTextBox.TextColor3 = Color3.fromRGB(255, 255, 255)
  132. EditorTextBox.Text = "-- Paste your script here\n\nprint('Hello, KRNL!')"
  133. EditorTextBox.TextXAlignment = Enum.TextXAlignment.Left
  134. EditorTextBox.TextYAlignment = Enum.TextYAlignment.Top
  135. EditorTextBox.Font = Enum.Font.Code
  136. EditorTextBox.MultiLine = true
  137. EditorTextBox.TextWrapped = true
  138. EditorTextBox.ClearTextOnFocus = false
  139. EditorTextBox.ZIndex = 4
  140. EditorTextBox.Parent = Editor
  141.  
  142. -- Execute Button
  143. local ExecuteButton = Instance.new("TextButton")
  144. ExecuteButton.Name = "ExecuteButton"
  145. ExecuteButton.Text = "EXECUTE"
  146. ExecuteButton.Size = UDim2.new(0, 120, 0, 30)
  147. ExecuteButton.Position = UDim2.new(0.5, -60, 1, -70)
  148. ExecuteButton.BackgroundColor3 = Color3.fromRGB(50, 50, 70)
  149. ExecuteButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  150. ExecuteButton.Font = Enum.Font.GothamBold
  151. ExecuteButton.ZIndex = 3
  152. ExecuteButton.Parent = HomeFrame
  153.  
  154. -- Clear Button
  155. local ClearButton = Instance.new("TextButton")
  156. ClearButton.Name = "ClearButton"
  157. ClearButton.Text = "CLEAR"
  158. ClearButton.Size = UDim2.new(0, 120, 0, 30)
  159. ClearButton.Position = UDim2.new(0.5, -60, 1, -35)
  160. ClearButton.BackgroundColor3 = Color3.fromRGB(70, 30, 30)
  161. ClearButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  162. ClearButton.Font = Enum.Font.GothamBold
  163. ClearButton.ZIndex = 3
  164. ClearButton.Parent = HomeFrame
  165.  
  166. -- Status Bar
  167. local StatusBar = Instance.new("Frame")
  168. StatusBar.Name = "StatusBar"
  169. StatusBar.Size = UDim2.new(1, 0, 0, 20)
  170. StatusBar.Position = UDim2.new(0, 0, 1, -20)
  171. StatusBar.BackgroundColor3 = Color3.fromRGB(20, 20, 25)
  172. StatusBar.BorderSizePixel = 0
  173. StatusBar.ZIndex = 3
  174. StatusBar.Parent = MainFrame
  175.  
  176. local StatusLabel = Instance.new("TextLabel")
  177. StatusLabel.Name = "StatusLabel"
  178. StatusLabel.Size = UDim2.new(1, -10, 1, 0)
  179. StatusLabel.Position = UDim2.new(0, 10, 0, 0)
  180. StatusLabel.BackgroundTransparency = 1
  181. StatusLabel.Text = "Ready"
  182. StatusLabel.TextColor3 = Color3.fromRGB(200, 200, 200)
  183. StatusLabel.TextXAlignment = Enum.TextXAlignment.Left
  184. StatusLabel.Font = Enum.Font.Gotham
  185. StatusLabel.TextSize = 12
  186. StatusLabel.ZIndex = 4
  187. StatusLabel.Parent = StatusBar
  188.  
  189. -- Scripts Tab Content
  190. local ScriptsFrame = TabFrames["Scripts"]
  191.  
  192. local ScriptList = Instance.new("ScrollingFrame")
  193. ScriptList.Name = "ScriptList"
  194. ScriptList.Size = UDim2.new(1, -20, 1, -20)
  195. ScriptList.Position = UDim2.new(0, 10, 0, 10)
  196. ScriptList.BackgroundColor3 = Color3.fromRGB(20, 20, 25)
  197. ScriptList.BorderSizePixel = 0
  198. ScriptList.ScrollBarThickness = 5
  199. ScriptList.AutomaticCanvasSize = Enum.AutomaticSize.Y
  200. ScriptList.ZIndex = 3
  201. ScriptList.Parent = ScriptsFrame
  202.  
  203. local UIListLayout = Instance.new("UIListLayout")
  204. UIListLayout.Padding = UDim.new(0, 5)
  205. UIListLayout.Parent = ScriptList
  206.  
  207. -- Example Scripts (would normally load from web)
  208. local ExampleScripts = {
  209. {Name = "Infinite Yield", Description = "Admin commands"},
  210. {Name = "Dark Dex", Description = "Advanced explorer"},
  211. {Name = "Simple Spy", Description = "Remote spy"},
  212. {Name = "Auto Farm", Description = "Automates grinding"},
  213. {Name = "Speed Hack", Description = "Increases walk speed"}
  214. }
  215.  
  216. for i, scriptData in ipairs(ExampleScripts) do
  217. local ScriptButton = Instance.new("Frame")
  218. ScriptButton.Name = scriptData.Name
  219. ScriptButton.Size = UDim2.new(1, 0, 0, 50)
  220. ScriptButton.BackgroundColor3 = Color3.fromRGB(30, 30, 40)
  221. ScriptButton.ZIndex = 4
  222. ScriptButton.Parent = ScriptList
  223.  
  224. local ScriptName = Instance.new("TextLabel")
  225. ScriptName.Name = "ScriptName"
  226. ScriptName.Size = UDim2.new(1, -10, 0.5, 0)
  227. ScriptName.Position = UDim2.new(0, 10, 0, 0)
  228. ScriptName.BackgroundTransparency = 1
  229. ScriptName.Text = scriptData.Name
  230. ScriptName.TextColor3 = Color3.fromRGB(255, 255, 255)
  231. ScriptName.TextXAlignment = Enum.TextXAlignment.Left
  232. ScriptName.Font = Enum.Font.GothamBold
  233. ScriptName.ZIndex = 5
  234. ScriptName.Parent = ScriptButton
  235.  
  236. local ScriptDesc = Instance.new("TextLabel")
  237. ScriptDesc.Name = "ScriptDesc"
  238. ScriptDesc.Size = UDim2.new(1, -10, 0.5, 0)
  239. ScriptDesc.Position = UDim2.new(0, 10, 0.5, 0)
  240. ScriptDesc.BackgroundTransparency = 1
  241. ScriptDesc.Text = scriptData.Description
  242. ScriptDesc.TextColor3 = Color3.fromRGB(200, 200, 200)
  243. ScriptDesc.TextXAlignment = Enum.TextXAlignment.Left
  244. ScriptDesc.Font = Enum.Font.Gotham
  245. ScriptDesc.TextSize = 12
  246. ScriptDesc.ZIndex = 5
  247. ScriptDesc.Parent = ScriptButton
  248.  
  249. local ExecuteScript = Instance.new("TextButton")
  250. ExecuteScript.Name = "ExecuteScript"
  251. ExecuteScript.Text = "EXECUTE"
  252. ExecuteScript.Size = UDim2.new(0, 80, 0.8, 0)
  253. ExecuteScript.Position = UDim2.new(1, -90, 0.1, 0)
  254. ExecuteScript.BackgroundColor3 = Color3.fromRGB(50, 50, 70)
  255. ExecuteScript.TextColor3 = Color3.fromRGB(255, 255, 255)
  256. ExecuteScript.Font = Enum.Font.GothamBold
  257. ExecuteScript.TextSize = 12
  258. ExecuteScript.ZIndex = 5
  259. ExecuteScript.Parent = ScriptButton
  260.  
  261. ExecuteScript.MouseButton1Click:Connect(function()
  262. EditorTextBox.Text = "-- "..scriptData.Name.."\n-- "..scriptData.Description.."\n\n-- Script would load here"
  263. for _, btn in pairs(TabButtons) do
  264. btn.BackgroundColor3 = Color3.fromRGB(30, 30, 40)
  265. end
  266. TabButtons["Home"].BackgroundColor3 = Color3.fromRGB(40, 40, 50)
  267. for _, frame in pairs(TabFrames) do
  268. frame.Visible = false
  269. end
  270. TabFrames["Home"].Visible = true
  271. StatusLabel.Text = "Loaded script: "..scriptData.Name
  272. end)
  273. end
  274.  
  275. -- Settings Tab Content
  276. local SettingsFrame = TabFrames["Settings"]
  277.  
  278. local SettingsLabel = Instance.new("TextLabel")
  279. SettingsLabel.Name = "SettingsLabel"
  280. SettingsLabel.Size = UDim2.new(1, -20, 0, 30)
  281. SettingsLabel.Position = UDim2.new(0, 10, 0, 10)
  282. SettingsLabel.BackgroundTransparency = 1
  283. SettingsLabel.Text = "SETTINGS"
  284. SettingsLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
  285. SettingsLabel.TextXAlignment = Enum.TextXAlignment.Left
  286. SettingsLabel.Font = Enum.Font.GothamBold
  287. SettingsLabel.ZIndex = 3
  288. SettingsLabel.Parent = SettingsFrame
  289.  
  290. -- Toggle GUI Functionality
  291. local function toggleGUI()
  292. MainFrame.Visible = not MainFrame.Visible
  293. ToggleButton.Text = MainFrame.Visible and "_" or "-"
  294. end
  295.  
  296. ToggleButton.MouseButton1Click:Connect(toggleGUI)
  297. CloseButton.MouseButton1Click:Connect(toggleGUI)
  298.  
  299. -- Execute Button Functionality
  300. ExecuteButton.MouseButton1Click:Connect(function()
  301. local scriptToRun = EditorTextBox.Text
  302. StatusLabel.Text = "Executing..."
  303.  
  304. local success, err = pcall(function()
  305. local fn, loadErr = loadstring(scriptToRun)
  306. if fn then
  307. fn()
  308. else
  309. error(loadErr)
  310. end
  311. end)
  312.  
  313. if success then
  314. StatusLabel.Text = "Execution successful!"
  315. else
  316. StatusLabel.Text = "Error: "..tostring(err)
  317. end
  318. end)
  319.  
  320. -- Clear Button Functionality
  321. ClearButton.MouseButton1Click:Connect(function()
  322. EditorTextBox.Text = ""
  323. StatusLabel.Text = "Editor cleared"
  324. end)
  325.  
  326. -- Make GUI Draggable
  327. local UserInputService = game:GetService("UserInputService")
  328. local dragging
  329. local dragInput
  330. local dragStart
  331. local startPos
  332.  
  333. local function update(input)
  334. local delta = input.Position - dragStart
  335. MainFrame.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
  336. end
  337.  
  338. Header.InputBegan:Connect(function(input)
  339. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  340. dragging = true
  341. dragStart = input.Position
  342. startPos = MainFrame.Position
  343.  
  344. input.Changed:Connect(function()
  345. if input.UserInputState == Enum.UserInputState.End then
  346. dragging = false
  347. end
  348. end)
  349. end
  350. end)
  351.  
  352. Header.InputChanged:Connect(function(input)
  353. if input.UserInputType == Enum.UserInputType.MouseMovement then
  354. dragInput = input
  355. end
  356. end)
  357.  
  358. UserInputService.InputChanged:Connect(function(input)
  359. if input == dragInput and dragging then
  360. update(input)
  361. end
  362. end)
  363.  
  364. -- Initial state
  365. toggleGUI() -- Start with GUI hidden
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement