Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local UserInputService = game:GetService("UserInputService")
- local RunService = game:GetService("RunService")
- -- Create ScreenGui
- local screenGui = Instance.new("ScreenGui")
- screenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
- -- Function to change all parts to a specific color
- local function changeColor(color)
- for _, part in pairs(workspace:GetDescendants()) do
- if part:IsA("BasePart") then
- part.BrickColor = BrickColor.new(color)
- end
- end
- end
- -- Create a draggable button function
- local function createDraggableButton(buttonText, position, color)
- local button = Instance.new("TextButton")
- button.Size = UDim2.new(0, 200, 0, 50)
- button.Position = position
- button.Text = buttonText
- button.Draggable = true
- button.Active = true
- button.Parent = screenGui
- button.MouseButton1Click:Connect(function()
- changeColor(color)
- end)
- end
- -- Create "Make Everything Red" button
- createDraggableButton("Make Everything Red", UDim2.new(0.5, -100, 0.4, -150), "Really red")
- -- Create "Make Everything Blue" button
- createDraggableButton("Make Everything Blue", UDim2.new(0.5, -100, 0.4, -75), "Really blue")
- -- Create "Make Everything Pink" button
- createDraggableButton("Make Everything Pink", UDim2.new(0.5, -100, 0.4, 0), "Hot pink")
- -- Create "Make Everything Brown" button
- createDraggableButton("Make Everything Brown", UDim2.new(0.5, -100, 0.4, 75), "Brown")
- -- Create "Make Everything White" button
- createDraggableButton("Make Everything White", UDim2.new(0.5, -100, 0.4, 150), "Institutional white")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement