Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- create a new ScreenGui and add it to the player's PlayerGui
- local gui = Instance.new("ScreenGui")
- gui.Name = "SynapseUI"
- gui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
- -- create a new Frame and add it to the ScreenGui
- local frame = Instance.new("Frame")
- frame.Name = "MainFrame"
- frame.Size = UDim2.new(0, 300, 0, 200)
- frame.Position = UDim2.new(0.5, -150, 0.5, -100)
- frame.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
- frame.BorderSizePixel = 0
- frame.Parent = gui
- -- create a new TextLabel and add it to the Frame
- local label = Instance.new("TextLabel")
- label.Name = "TitleLabel"
- label.Size = UDim2.new(1, 0, 0, 50)
- label.Position = UDim2.new(0, 0, 0, 0)
- label.Text = "Synapse X"
- label.TextColor3 = Color3.fromRGB(255, 255, 255)
- label.TextSize = 36
- label.BackgroundTransparency = 1
- label.Parent = frame
- -- create a new TextBox and add it to the Frame
- local textBox = Instance.new("TextBox")
- textBox.Name = "ScriptBox"
- textBox.Size = UDim2.new(1, -20, 1, -70)
- textBox.Position = UDim2.new(0, 10, 0, 50)
- textBox.Text = "-- Enter your script here"
- textBox.TextColor3 = Color3.fromRGB(255, 255, 255)
- textBox.TextSize = 14
- textBox.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
- textBox.BorderSizePixel = 0
- textBox.Parent = frame
- -- create a new TextButton and add it to the Frame
- local button = Instance.new("TextButton")
- button.Name = "ExecuteButton"
- button.Size = UDim2.new(1, -20, 0, 20)
- button.Position = UDim2.new(0, 10, 1, -30)
- button.Text = "Execute"
- button.TextColor3 = Color3.fromRGB(255, 255, 255)
- button.TextSize = 14
- button.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
- button.BorderSizePixel = 0
- button.Parent = frame
- -- create a function to execute the script in the TextBox when the button is clicked
- function button.MouseButton1Click()
- -- get the script from the TextBox
- local script = textBox.Text
- -- load and execute the script
- local success, errorMessage = pcall(loadstring(script))
- if success then
- print("Script executed successfully")
- else
- print("Error: " .. errorMessage)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement