Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- KRNL-Style Executor for EXECUTOR 2.0 Tycoon
- -- LocalScript version with toggle button
- local Player = game:GetService("Players").LocalPlayer
- local PlayerGui = Player:WaitForChild("PlayerGui")
- -- Main GUI Container
- local ScreenGui = Instance.new("ScreenGui")
- ScreenGui.Name = "KRNLStyleExecutor"
- ScreenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
- ScreenGui.Parent = PlayerGui
- -- Toggle Button (Bottom right corner)
- local ToggleButton = Instance.new("TextButton")
- ToggleButton.Name = "ToggleButton"
- ToggleButton.Text = "-"
- ToggleButton.Size = UDim2.new(0, 40, 0, 30)
- ToggleButton.Position = UDim2.new(1, -45, 1, -40)
- ToggleButton.AnchorPoint = Vector2.new(1, 1)
- ToggleButton.BackgroundColor3 = Color3.fromRGB(30, 30, 40)
- ToggleButton.TextColor3 = Color3.fromRGB(255, 255, 255)
- ToggleButton.Font = Enum.Font.GothamBold
- ToggleButton.TextSize = 20
- ToggleButton.BorderSizePixel = 0
- ToggleButton.ZIndex = 2
- ToggleButton.Parent = ScreenGui
- -- Main Frame (Hidden by default)
- local MainFrame = Instance.new("Frame")
- MainFrame.Name = "MainFrame"
- MainFrame.Size = UDim2.new(0, 500, 0, 350)
- MainFrame.Position = UDim2.new(0.5, -250, 0.5, -175)
- MainFrame.BackgroundColor3 = Color3.fromRGB(25, 25, 30)
- MainFrame.BorderSizePixel = 0
- MainFrame.Visible = false
- MainFrame.ZIndex = 2
- MainFrame.Parent = ScreenGui
- -- KRNL Header
- local Header = Instance.new("Frame")
- Header.Name = "Header"
- Header.Size = UDim2.new(1, 0, 0, 30)
- Header.BackgroundColor3 = Color3.fromRGB(20, 20, 25)
- Header.BorderSizePixel = 0
- Header.ZIndex = 3
- Header.Parent = MainFrame
- -- KRNL Logo
- local Logo = Instance.new("ImageLabel")
- Logo.Name = "Logo"
- Logo.Size = UDim2.new(0, 100, 0, 20)
- Logo.Position = UDim2.new(0, 10, 0.5, -10)
- Logo.BackgroundTransparency = 1
- Logo.Image = "rbxassetid://YOUR_LOGO_IMAGE_ID" -- Replace with actual KRNL logo ID
- Logo.ZIndex = 4
- Logo.Parent = Header
- -- Close Button
- local CloseButton = Instance.new("TextButton")
- CloseButton.Name = "CloseButton"
- CloseButton.Text = "X"
- CloseButton.Size = UDim2.new(0, 30, 1, 0)
- CloseButton.Position = UDim2.new(1, -30, 0, 0)
- CloseButton.BackgroundColor3 = Color3.fromRGB(40, 40, 50)
- CloseButton.TextColor3 = Color3.fromRGB(255, 255, 255)
- CloseButton.Font = Enum.Font.GothamBold
- CloseButton.ZIndex = 4
- CloseButton.Parent = Header
- -- Tab Buttons
- local Tabs = {"Home", "Scripts", "Settings"}
- local TabButtons = {}
- local TabFrames = {}
- for i, tabName in ipairs(Tabs) do
- local TabButton = Instance.new("TextButton")
- TabButton.Name = tabName.."Tab"
- TabButton.Text = tabName
- TabButton.Size = UDim2.new(0.33, -2, 0, 30)
- TabButton.Position = UDim2.new((i-1)*0.33, 0, 0, 30)
- TabButton.BackgroundColor3 = i == 1 and Color3.fromRGB(40, 40, 50) or Color3.fromRGB(30, 30, 40)
- TabButton.TextColor3 = Color3.fromRGB(255, 255, 255)
- TabButton.Font = Enum.Font.Gotham
- TabButton.ZIndex = 3
- TabButton.Parent = MainFrame
- local TabFrame = Instance.new("Frame")
- TabFrame.Name = tabName.."Frame"
- TabFrame.Size = UDim2.new(1, 0, 1, -60)
- TabFrame.Position = UDim2.new(0, 0, 0, 60)
- TabFrame.BackgroundTransparency = 1
- TabFrame.Visible = i == 1
- TabFrame.ZIndex = 2
- TabFrame.Parent = MainFrame
- TabButtons[tabName] = TabButton
- TabFrames[tabName] = TabFrame
- TabButton.MouseButton1Click:Connect(function()
- for _, btn in pairs(TabButtons) do
- btn.BackgroundColor3 = Color3.fromRGB(30, 30, 40)
- end
- TabButton.BackgroundColor3 = Color3.fromRGB(40, 40, 50)
- for _, frame in pairs(TabFrames) do
- frame.Visible = false
- end
- TabFrame.Visible = true
- end)
- end
- -- Home Tab Content
- local HomeFrame = TabFrames["Home"]
- -- Script Editor
- local Editor = Instance.new("ScrollingFrame")
- Editor.Name = "Editor"
- Editor.Size = UDim2.new(1, -20, 1, -100)
- Editor.Position = UDim2.new(0, 10, 0, 10)
- Editor.BackgroundColor3 = Color3.fromRGB(20, 20, 25)
- Editor.BorderSizePixel = 0
- Editor.ScrollBarThickness = 5
- Editor.ZIndex = 3
- Editor.Parent = HomeFrame
- local EditorTextBox = Instance.new("TextBox")
- EditorTextBox.Name = "EditorTextBox"
- EditorTextBox.Size = UDim2.new(1, -10, 1, -10)
- EditorTextBox.Position = UDim2.new(0, 5, 0, 5)
- EditorTextBox.BackgroundTransparency = 1
- EditorTextBox.TextColor3 = Color3.fromRGB(255, 255, 255)
- EditorTextBox.Text = "-- Paste your script here\n\nprint('Hello, KRNL!')"
- EditorTextBox.TextXAlignment = Enum.TextXAlignment.Left
- EditorTextBox.TextYAlignment = Enum.TextYAlignment.Top
- EditorTextBox.Font = Enum.Font.Code
- EditorTextBox.MultiLine = true
- EditorTextBox.TextWrapped = true
- EditorTextBox.ClearTextOnFocus = false
- EditorTextBox.ZIndex = 4
- EditorTextBox.Parent = Editor
- -- Execute Button
- local ExecuteButton = Instance.new("TextButton")
- ExecuteButton.Name = "ExecuteButton"
- ExecuteButton.Text = "EXECUTE"
- ExecuteButton.Size = UDim2.new(0, 120, 0, 30)
- ExecuteButton.Position = UDim2.new(0.5, -60, 1, -70)
- ExecuteButton.BackgroundColor3 = Color3.fromRGB(50, 50, 70)
- ExecuteButton.TextColor3 = Color3.fromRGB(255, 255, 255)
- ExecuteButton.Font = Enum.Font.GothamBold
- ExecuteButton.ZIndex = 3
- ExecuteButton.Parent = HomeFrame
- -- Clear Button
- local ClearButton = Instance.new("TextButton")
- ClearButton.Name = "ClearButton"
- ClearButton.Text = "CLEAR"
- ClearButton.Size = UDim2.new(0, 120, 0, 30)
- ClearButton.Position = UDim2.new(0.5, -60, 1, -35)
- ClearButton.BackgroundColor3 = Color3.fromRGB(70, 30, 30)
- ClearButton.TextColor3 = Color3.fromRGB(255, 255, 255)
- ClearButton.Font = Enum.Font.GothamBold
- ClearButton.ZIndex = 3
- ClearButton.Parent = HomeFrame
- -- Status Bar
- local StatusBar = Instance.new("Frame")
- StatusBar.Name = "StatusBar"
- StatusBar.Size = UDim2.new(1, 0, 0, 20)
- StatusBar.Position = UDim2.new(0, 0, 1, -20)
- StatusBar.BackgroundColor3 = Color3.fromRGB(20, 20, 25)
- StatusBar.BorderSizePixel = 0
- StatusBar.ZIndex = 3
- StatusBar.Parent = MainFrame
- local StatusLabel = Instance.new("TextLabel")
- StatusLabel.Name = "StatusLabel"
- StatusLabel.Size = UDim2.new(1, -10, 1, 0)
- StatusLabel.Position = UDim2.new(0, 10, 0, 0)
- StatusLabel.BackgroundTransparency = 1
- StatusLabel.Text = "Ready"
- StatusLabel.TextColor3 = Color3.fromRGB(200, 200, 200)
- StatusLabel.TextXAlignment = Enum.TextXAlignment.Left
- StatusLabel.Font = Enum.Font.Gotham
- StatusLabel.TextSize = 12
- StatusLabel.ZIndex = 4
- StatusLabel.Parent = StatusBar
- -- Scripts Tab Content
- local ScriptsFrame = TabFrames["Scripts"]
- local ScriptList = Instance.new("ScrollingFrame")
- ScriptList.Name = "ScriptList"
- ScriptList.Size = UDim2.new(1, -20, 1, -20)
- ScriptList.Position = UDim2.new(0, 10, 0, 10)
- ScriptList.BackgroundColor3 = Color3.fromRGB(20, 20, 25)
- ScriptList.BorderSizePixel = 0
- ScriptList.ScrollBarThickness = 5
- ScriptList.AutomaticCanvasSize = Enum.AutomaticSize.Y
- ScriptList.ZIndex = 3
- ScriptList.Parent = ScriptsFrame
- local UIListLayout = Instance.new("UIListLayout")
- UIListLayout.Padding = UDim.new(0, 5)
- UIListLayout.Parent = ScriptList
- -- Example Scripts (would normally load from web)
- local ExampleScripts = {
- {Name = "Infinite Yield", Description = "Admin commands"},
- {Name = "Dark Dex", Description = "Advanced explorer"},
- {Name = "Simple Spy", Description = "Remote spy"},
- {Name = "Auto Farm", Description = "Automates grinding"},
- {Name = "Speed Hack", Description = "Increases walk speed"}
- }
- for i, scriptData in ipairs(ExampleScripts) do
- local ScriptButton = Instance.new("Frame")
- ScriptButton.Name = scriptData.Name
- ScriptButton.Size = UDim2.new(1, 0, 0, 50)
- ScriptButton.BackgroundColor3 = Color3.fromRGB(30, 30, 40)
- ScriptButton.ZIndex = 4
- ScriptButton.Parent = ScriptList
- local ScriptName = Instance.new("TextLabel")
- ScriptName.Name = "ScriptName"
- ScriptName.Size = UDim2.new(1, -10, 0.5, 0)
- ScriptName.Position = UDim2.new(0, 10, 0, 0)
- ScriptName.BackgroundTransparency = 1
- ScriptName.Text = scriptData.Name
- ScriptName.TextColor3 = Color3.fromRGB(255, 255, 255)
- ScriptName.TextXAlignment = Enum.TextXAlignment.Left
- ScriptName.Font = Enum.Font.GothamBold
- ScriptName.ZIndex = 5
- ScriptName.Parent = ScriptButton
- local ScriptDesc = Instance.new("TextLabel")
- ScriptDesc.Name = "ScriptDesc"
- ScriptDesc.Size = UDim2.new(1, -10, 0.5, 0)
- ScriptDesc.Position = UDim2.new(0, 10, 0.5, 0)
- ScriptDesc.BackgroundTransparency = 1
- ScriptDesc.Text = scriptData.Description
- ScriptDesc.TextColor3 = Color3.fromRGB(200, 200, 200)
- ScriptDesc.TextXAlignment = Enum.TextXAlignment.Left
- ScriptDesc.Font = Enum.Font.Gotham
- ScriptDesc.TextSize = 12
- ScriptDesc.ZIndex = 5
- ScriptDesc.Parent = ScriptButton
- local ExecuteScript = Instance.new("TextButton")
- ExecuteScript.Name = "ExecuteScript"
- ExecuteScript.Text = "EXECUTE"
- ExecuteScript.Size = UDim2.new(0, 80, 0.8, 0)
- ExecuteScript.Position = UDim2.new(1, -90, 0.1, 0)
- ExecuteScript.BackgroundColor3 = Color3.fromRGB(50, 50, 70)
- ExecuteScript.TextColor3 = Color3.fromRGB(255, 255, 255)
- ExecuteScript.Font = Enum.Font.GothamBold
- ExecuteScript.TextSize = 12
- ExecuteScript.ZIndex = 5
- ExecuteScript.Parent = ScriptButton
- ExecuteScript.MouseButton1Click:Connect(function()
- EditorTextBox.Text = "-- "..scriptData.Name.."\n-- "..scriptData.Description.."\n\n-- Script would load here"
- for _, btn in pairs(TabButtons) do
- btn.BackgroundColor3 = Color3.fromRGB(30, 30, 40)
- end
- TabButtons["Home"].BackgroundColor3 = Color3.fromRGB(40, 40, 50)
- for _, frame in pairs(TabFrames) do
- frame.Visible = false
- end
- TabFrames["Home"].Visible = true
- StatusLabel.Text = "Loaded script: "..scriptData.Name
- end)
- end
- -- Settings Tab Content
- local SettingsFrame = TabFrames["Settings"]
- local SettingsLabel = Instance.new("TextLabel")
- SettingsLabel.Name = "SettingsLabel"
- SettingsLabel.Size = UDim2.new(1, -20, 0, 30)
- SettingsLabel.Position = UDim2.new(0, 10, 0, 10)
- SettingsLabel.BackgroundTransparency = 1
- SettingsLabel.Text = "SETTINGS"
- SettingsLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
- SettingsLabel.TextXAlignment = Enum.TextXAlignment.Left
- SettingsLabel.Font = Enum.Font.GothamBold
- SettingsLabel.ZIndex = 3
- SettingsLabel.Parent = SettingsFrame
- -- Toggle GUI Functionality
- local function toggleGUI()
- MainFrame.Visible = not MainFrame.Visible
- ToggleButton.Text = MainFrame.Visible and "_" or "-"
- end
- ToggleButton.MouseButton1Click:Connect(toggleGUI)
- CloseButton.MouseButton1Click:Connect(toggleGUI)
- -- Execute Button Functionality
- ExecuteButton.MouseButton1Click:Connect(function()
- local scriptToRun = EditorTextBox.Text
- StatusLabel.Text = "Executing..."
- local success, err = pcall(function()
- local fn, loadErr = loadstring(scriptToRun)
- if fn then
- fn()
- else
- error(loadErr)
- end
- end)
- if success then
- StatusLabel.Text = "Execution successful!"
- else
- StatusLabel.Text = "Error: "..tostring(err)
- end
- end)
- -- Clear Button Functionality
- ClearButton.MouseButton1Click:Connect(function()
- EditorTextBox.Text = ""
- StatusLabel.Text = "Editor cleared"
- end)
- -- Make GUI Draggable
- local UserInputService = game:GetService("UserInputService")
- local dragging
- local dragInput
- local dragStart
- local startPos
- local function update(input)
- local delta = input.Position - dragStart
- MainFrame.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
- end
- Header.InputBegan:Connect(function(input)
- if input.UserInputType == Enum.UserInputType.MouseButton1 then
- dragging = true
- dragStart = input.Position
- startPos = MainFrame.Position
- input.Changed:Connect(function()
- if input.UserInputState == Enum.UserInputState.End then
- dragging = false
- end
- end)
- end
- end)
- Header.InputChanged:Connect(function(input)
- if input.UserInputType == Enum.UserInputType.MouseMovement then
- dragInput = input
- end
- end)
- UserInputService.InputChanged:Connect(function(input)
- if input == dragInput and dragging then
- update(input)
- end
- end)
- -- Initial state
- toggleGUI() -- Start with GUI hidden
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement