RobloxScripterAI
Discord ↗
Link Copied to Clipboard
×
"make a control panel that can edit the fog and make the panel rainbow"
-- local script (StarterGUI) local player = game.Players.LocalPlayer local screenGui = Instance.new("ScreenGui", player.PlayerGui) local controlPanel = Instance.new("Frame", screenGui) controlPanel.BackgroundColor3 = Color3.fromRGB(255, 0, 0) -- Starting color for the rainbow effect local fogButton = Instance.new("TextButton", controlPanel) fogButton.Text = "Toggle Fog" fogButton.TextColor3 = Color3.fromRGB(255, 255, 255) fogButton.BackgroundColor3 = Color3.fromRGB(0, 0, 0) fogButton.UICorner = 5 fogButton.MouseButton1Click:Connect(function() if game.Lighting.FogEnd == 100000 then game.Lighting.FogEnd = 10000 else game.Lighting.FogEnd = 100000 end end) local colors = {Color3.fromRGB(255, 0, 0), Color3.fromRGB(255, 127, 0), Color3.fromRGB(255, 255, 0), Color3.fromRGB(0, 255, 0), Color3.fromRGB(0, 0, 255), Color3.fromRGB(75, 0, 130), Color3.fromRGB(143, 0, 255)} -- Rainbow colors local currentColor = 1 game:GetService("RunService").Heartbeat:Connect(function() controlPanel.BackgroundColor3 = colors[currentColor] currentColor = currentColor % #colors + 1 end)