Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Create the ScreenGui
- local screenGui = Instance.new("ScreenGui")
- screenGui.Name = "ScriptEditorGui"
- screenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
- -- Create the main frame
- local mainFrame = Instance.new("Frame")
- mainFrame.Size = UDim2.new(0.4, 0, 0.6, 0)
- mainFrame.Position = UDim2.new(0.3, 0, 0.2, 0)
- mainFrame.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
- mainFrame.Parent = screenGui
- -- Create the top bar
- local topBar = Instance.new("Frame")
- topBar.Size = UDim2.new(1, 0, 0.1, 0)
- topBar.BackgroundColor3 = Color3.fromRGB(80, 80, 80)
- topBar.Parent = mainFrame
- -- Create the label for the top bar
- local topBarLabel = Instance.new("TextLabel")
- topBarLabel.Size = UDim2.new(0.8, 0, 1, 0)
- topBarLabel.Position = UDim2.new(0.1, 0, 0, 0)
- topBarLabel.Text = "Krypton"
- topBarLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
- topBarLabel.BackgroundTransparency = 1
- topBarLabel.Parent = topBar
- -- Create the close button
- local closeButton = Instance.new("TextButton")
- closeButton.Size = UDim2.new(0.1, 0, 1, 0)
- closeButton.Position = UDim2.new(0.9, 0, 0, 0)
- closeButton.Text = "X"
- closeButton.TextColor3 = Color3.fromRGB(255, 255, 255)
- closeButton.BackgroundColor3 = Color3.fromRGB(200, 0, 0) -- Red background for close button
- closeButton.Parent = topBar
- -- Create the open panel button
- local openPanelButton = Instance.new("TextButton")
- openPanelButton.Size = UDim2.new(0.1, 0, 1, 0)
- openPanelButton.Position = UDim2.new(0, 0, 0, 0)
- openPanelButton.Text = ">"
- openPanelButton.TextColor3 = Color3.fromRGB(255, 255, 255)
- openPanelButton.BackgroundColor3 = Color3.fromRGB(0, 128, 0) -- Light green background for open panel button
- openPanelButton.Parent = topBar
- -- Create the minify button
- local minifyButton = Instance.new("TextButton")
- minifyButton.Size = UDim2.new(0.1, 0, 1, 0)
- minifyButton.Position = UDim2.new(0.8, 0, 0, 0)
- minifyButton.Text = "Minify"
- minifyButton.TextColor3 = Color3.fromRGB(255, 255, 255)
- minifyButton.BackgroundColor3 = Color3.fromRGB(0, 128, 0) -- Green background for minify button
- minifyButton.Parent = topBar
- -- Create the script editor text box
- local scriptEditor = Instance.new("TextBox")
- scriptEditor.Size = UDim2.new(1, -20, 0.7, -10)
- scriptEditor.Position = UDim2.new(0, 10, 0.1, 10)
- scriptEditor.MultiLine = true
- scriptEditor.Text = 'print("Hello World!")'
- scriptEditor.TextWrapped = true
- scriptEditor.TextXAlignment = Enum.TextXAlignment.Left
- scriptEditor.TextYAlignment = Enum.TextYAlignment.Top
- scriptEditor.TextColor3 = Color3.fromRGB(255, 255, 255)
- scriptEditor.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
- scriptEditor.Parent = mainFrame
- -- Create the execute button
- local executeButton = Instance.new("TextButton")
- executeButton.Size = UDim2.new(0.3, 0, 0.1, 0)
- executeButton.Position = UDim2.new(0.05, 0, 0.85, 0)
- executeButton.Text = "Execute"
- executeButton.TextColor3 = Color3.fromRGB(255, 255, 255)
- executeButton.BackgroundColor3 = Color3.fromRGB(80, 0, 128)
- executeButton.Parent = mainFrame
- -- Create the clear button
- local clearButton = Instance.new("TextButton")
- clearButton.Size = UDim2.new(0.3, 0, 0.1, 0)
- clearButton.Position = UDim2.new(0.65, 0, 0.85, 0)
- clearButton.Text = "Clear Editor"
- clearButton.TextColor3 = Color3.fromRGB(255, 255, 255)
- clearButton.BackgroundColor3 = Color3.fromRGB(128, 0, 0)
- clearButton.Parent = mainFrame
- -- Create the panel
- local panel = Instance.new("Frame")
- panel.Size = UDim2.new(0.16, 0, 0.6, 0) -- 20% smaller in width (from 0.2 to 0.16)
- panel.Position = UDim2.new(1, 0, 0.2, 0)
- panel.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
- panel.Visible = false
- panel.Parent = screenGui
- -- Create the top bar for the panel
- local panelTopBar = Instance.new("Frame")
- panelTopBar.Size = UDim2.new(1, 0, 0.1, 0)
- panelTopBar.BackgroundColor3 = Color3.fromRGB(80, 80, 80)
- panelTopBar.Parent = panel
- -- Create the label for the panel top bar
- local panelTopBarLabel = Instance.new("TextLabel")
- panelTopBarLabel.Size = UDim2.new(1, 0, 1, 0)
- panelTopBarLabel.Text = "Extra's"
- panelTopBarLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
- panelTopBarLabel.BackgroundTransparency = 1
- panelTopBarLabel.Parent = panelTopBar
- -- Create the load button inside the panel
- local loadButton = Instance.new("TextButton")
- loadButton.Size = UDim2.new(0.8, 0, 0.2, 0)
- loadButton.Position = UDim2.new(0.1, 0, 0.3, 0)
- loadButton.Text = "Load to Executor"
- loadButton.TextColor3 = Color3.fromRGB(255, 255, 255)
- loadButton.BackgroundColor3 = Color3.fromRGB(80, 80, 80) -- Matching top bar background
- loadButton.Parent = panel
- -- Create the end executor button inside the panel
- local endButton = Instance.new("TextButton")
- endButton.Size = UDim2.new(0.8, 0, 0.2, 0)
- endButton.Position = UDim2.new(0.1, 0, 0.55, 0)
- endButton.Text = "Destroy Krypton Executor"
- endButton.TextColor3 = Color3.fromRGB(255, 255, 255)
- endButton.BackgroundColor3 = Color3.fromRGB(128, 0, 0) -- Matching clear button background
- endButton.Parent = panel
- -- Function to execute the script
- local function executeScript()
- local scriptText = scriptEditor.Text
- local success, message = pcall(function()
- loadstring(scriptText)()
- end)
- if not success then
- scriptEditor.Text = "Error executing script: " .. message .. "\n" .. scriptText
- end
- end
- -- Function to clear the script editor
- local function clearEditor()
- scriptEditor.Text = ""
- end
- -- Function to close the entire UI
- local function closeUI()
- screenGui:Destroy()
- end
- -- Function to open the panel
- local function openPanel()
- if not panel.Visible then
- panel.Visible = true
- panel:TweenPosition(UDim2.new(0.84, 0, 0.2, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Quart, 0.5, true)
- else
- panel:TweenPosition(UDim2.new(1, 0, 0.2, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Quart, 0.5, true)
- panel.Visible = false
- end
- end
- -- Function to toggle transparency
- local function toggleTransparency()
- for _, obj in ipairs(mainFrame:GetDescendants()) do
- if obj ~= topBar and obj ~= minifyButton then
- if obj:IsA("GuiObject") then
- obj.BackgroundTransparency = 0.5
- end
- end
- end
- end
- -- Function to restore transparency
- local function restoreTransparency()
- for _, obj in ipairs(mainFrame:GetDescendants()) do
- if obj:IsA("GuiObject") then
- obj.BackgroundTransparency = 0
- end
- end
- end
- -- Function to load text from clipboard
- local function loadText()
- local clipboardText = game:GetService("GuiService"):GetClipboard()
- scriptEditor.Text = clipboardText
- end
- -- Function to toggle UI visibility
- local function toggleUIVisibility()
- screenGui.Enabled = not screenGui.Enabled
- end
- -- Event listener for right shift key press
- game:GetService("UserInputService").InputBegan:Connect(function(input)
- if input.KeyCode == Enum.KeyCode.RightShift then
- toggleUIVisibility()
- end
- end)
- -- Event listener for minify button click
- minifyButton.MouseButton1Click:Connect(function()
- if mainFrame.BackgroundTransparency == 0 then
- toggleTransparency()
- else
- restoreTransparency()
- end
- end)
- -- Connect the buttons to their functions
- executeButton.MouseButton1Click:Connect(executeScript)
- clearButton.MouseButton1Click:Connect(clearEditor)
- closeButton.MouseButton1Click:Connect(closeUI)
- openPanelButton.MouseButton1Click:Connect(openPanel)
- loadButton.MouseButton1Click:Connect(loadText)
- endButton.MouseButton1Click:Connect(closeUI)
Advertisement
Add Comment
Please, Sign In to add comment