-- EXECUTOR 2.0 Tycoon Game Lua Executor (LocalScript) -- KRNL-inspired interface local Executor = {} -- Configuration Executor.Config = { WindowTitle = "EXECUTOR 2.0 | KRNL Style", WindowSize = Vector2.new(500, 400), Theme = { Background = Color3.fromRGB(30, 30, 40), Header = Color3.fromRGB(20, 20, 30), Button = Color3.fromRGB(50, 50, 70), ButtonHover = Color3.fromRGB(70, 70, 90), Text = Color3.fromRGB(255, 255, 255), Error = Color3.fromRGB(255, 50, 50), Success = Color3.fromRGB(50, 255, 50) } } -- Create the main window function Executor:CreateWindow() -- Create ScreenGui local ScreenGui = Instance.new("ScreenGui") ScreenGui.Name = "Executor2GUI" ScreenGui.Parent = game:GetService("Players").LocalPlayer:WaitForChild("PlayerGui") -- Main frame local MainFrame = Instance.new("Frame") MainFrame.Name = "MainFrame" MainFrame.Size = UDim2.new(0, self.Config.WindowSize.X, 0, self.Config.WindowSize.Y) MainFrame.Position = UDim2.new(0.5, -self.Config.WindowSize.X/2, 0.5, -self.Config.WindowSize.Y/2) MainFrame.BackgroundColor3 = self.Config.Theme.Background MainFrame.BorderSizePixel = 0 MainFrame.Parent = ScreenGui -- Header local Header = Instance.new("Frame") Header.Name = "Header" Header.Size = UDim2.new(1, 0, 0, 30) Header.BackgroundColor3 = self.Config.Theme.Header Header.BorderSizePixel = 0 Header.Parent = MainFrame -- Title local Title = Instance.new("TextLabel") Title.Name = "Title" Title.Text = self.Config.WindowTitle Title.Size = UDim2.new(1, -10, 1, 0) Title.Position = UDim2.new(0, 10, 0, 0) Title.BackgroundTransparency = 1 Title.TextColor3 = self.Config.Theme.Text Title.TextXAlignment = Enum.TextXAlignment.Left Title.Font = Enum.Font.GothamBold Title.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 = self.Config.Theme.Button CloseButton.TextColor3 = self.Config.Theme.Text CloseButton.BorderSizePixel = 0 CloseButton.Font = Enum.Font.GothamBold CloseButton.Parent = Header CloseButton.MouseButton1Click:Connect(function() ScreenGui:Destroy() end) -- Tab buttons local Tabs = {"Executor", "Script Hub"} local TabButtons = {} local TabContent = {} for i, tabName in ipairs(Tabs) do local TabButton = Instance.new("TextButton") TabButton.Name = tabName .. "Tab" TabButton.Text = tabName TabButton.Size = UDim2.new(0.5, 0, 0, 30) TabButton.Position = UDim2.new((i-1)*0.5, 0, 0, 30) TabButton.BackgroundColor3 = self.Config.Theme.Button TabButton.TextColor3 = self.Config.Theme.Text TabButton.BorderSizePixel = 0 TabButton.Font = Enum.Font.Gotham 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.Parent = MainFrame TabButtons[tabName] = TabButton TabContent[tabName] = TabFrame TabButton.MouseButton1Click:Connect(function() for _, frame in pairs(TabContent) do frame.Visible = false end TabFrame.Visible = true end) end -- Executor Tab Content local ExecutorFrame = TabContent["Executor"] -- Script Editor local Editor = Instance.new("TextBox") Editor.Name = "Editor" Editor.Size = UDim2.new(1, -20, 1, -80) Editor.Position = UDim2.new(0, 10, 0, 10) Editor.BackgroundColor3 = Color3.fromRGB(40, 40, 50) Editor.TextColor3 = self.Config.Theme.Text Editor.Text = "-- Paste your script here\n-- Or type your code" Editor.ClearTextOnFocus = false Editor.TextXAlignment = Enum.TextXAlignment.Left Editor.TextYAlignment = Enum.TextYAlignment.Top Editor.Font = Enum.Font.Code Editor.MultiLine = true Editor.TextWrapped = true Editor.Parent = ExecutorFrame -- 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, -60) ExecuteButton.BackgroundColor3 = self.Config.Theme.Button ExecuteButton.TextColor3 = self.Config.Theme.Text ExecuteButton.Font = Enum.Font.GothamBold ExecuteButton.Parent = ExecutorFrame -- Status label local StatusLabel = Instance.new("TextLabel") StatusLabel.Name = "StatusLabel" StatusLabel.Size = UDim2.new(1, -20, 0, 20) StatusLabel.Position = UDim2.new(0, 10, 1, -30) StatusLabel.BackgroundTransparency = 1 StatusLabel.Text = "Ready" StatusLabel.TextColor3 = self.Config.Theme.Text StatusLabel.TextXAlignment = Enum.TextXAlignment.Left StatusLabel.Font = Enum.Font.Gotham StatusLabel.Parent = ExecutorFrame -- Execute button functionality ExecuteButton.MouseButton1Click:Connect(function() local scriptToExecute = Editor.Text StatusLabel.Text = "Executing..." StatusLabel.TextColor3 = self.Config.Theme.Text local success, errorMessage = pcall(function() local fn, err = loadstring(scriptToExecute) if fn then fn() else error(err) end end) if success then StatusLabel.Text = "Execution successful!" StatusLabel.TextColor3 = self.Config.Theme.Success else StatusLabel.Text = "Error: " .. tostring(errorMessage) StatusLabel.TextColor3 = self.Config.Theme.Error end end) -- Script Hub Tab Content local ScriptHubFrame = TabContent["Script Hub"] -- Script list local ScriptList = Instance.new("ScrollingFrame") ScriptList.Name = "ScriptList" ScriptList.Size = UDim2.new(1, -20, 1, -80) ScriptList.Position = UDim2.new(0, 10, 0, 10) ScriptList.BackgroundColor3 = Color3.fromRGB(40, 40, 50) ScriptList.BorderSizePixel = 0 ScriptList.CanvasSize = UDim2.new(0, 0, 0, 0) ScriptList.AutomaticCanvasSize = Enum.AutomaticSize.Y ScriptList.ScrollBarThickness = 5 ScriptList.Parent = ScriptHubFrame local UIListLayout = Instance.new("UIListLayout") UIListLayout.Padding = UDim.new(0, 5) UIListLayout.Parent = ScriptList -- Example scripts (in a real implementation, you would fetch these from a web source) local ExampleScripts = { { Name = "Infinite Money", Code = "game:GetService('Players').LocalPlayer.leaderstats.Money.Value = 999999" }, { Name = "Speed Hack", Code = "game:GetService('Players').LocalPlayer.Character.Humanoid.WalkSpeed = 50" }, { Name = "Auto Clicker", Code = "while wait(0.1) do\n -- Your auto click code here\nend" } } -- Add script buttons for _, scriptData in ipairs(ExampleScripts) do local ScriptButton = Instance.new("TextButton") ScriptButton.Name = scriptData.Name ScriptButton.Text = scriptData.Name ScriptButton.Size = UDim2.new(1, 0, 0, 30) ScriptButton.BackgroundColor3 = self.Config.Theme.Button ScriptButton.TextColor3 = self.Config.Theme.Text ScriptButton.Font = Enum.Font.Gotham ScriptButton.Parent = ScriptList ScriptButton.MouseButton1Click:Connect(function() Editor.Text = "-- " .. scriptData.Name .. "\n" .. scriptData.Code for _, frame in pairs(TabContent) do frame.Visible = false end TabContent["Executor"].Visible = true end) end -- Search box local SearchBox = Instance.new("TextBox") SearchBox.Name = "SearchBox" SearchBox.Size = UDim2.new(1, -20, 0, 30) SearchBox.Position = UDim2.new(0, 10, 1, -60) SearchBox.BackgroundColor3 = Color3.fromRGB(40, 40, 50) SearchBox.TextColor3 = self.Config.Theme.Text SearchBox.PlaceholderText = "Search scripts..." SearchBox.ClearTextOnFocus = false SearchBox.Font = Enum.Font.Gotham SearchBox.Parent = ScriptHubFrame -- Load button for web scripts local LoadWebButton = Instance.new("TextButton") LoadWebButton.Name = "LoadWebButton" LoadWebButton.Text = "LOAD FROM WEB" LoadWebButton.Size = UDim2.new(1, -20, 0, 30) LoadWebButton.Position = UDim2.new(0, 10, 1, -25) LoadWebButton.BackgroundColor3 = self.Config.Theme.Button LoadWebButton.TextColor3 = self.Config.Theme.Text LoadWebButton.Font = Enum.Font.GothamBold LoadWebButton.Parent = ScriptHubFrame LoadWebButton.MouseButton1Click:Connect(function() StatusLabel.Text = "Loading from web..." StatusLabel.TextColor3 = self.Config.Theme.Text -- In a real implementation, you would make an HTTP request here -- For security reasons, this is just a simulation delay(1, function() StatusLabel.Text = "Web loading not implemented in this example" StatusLabel.TextColor3 = self.Config.Theme.Error end) end) -- Make window 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) end -- Initialize the executor Executor:CreateWindow()