local RS = game:GetService("ReplicatedStorage")
local player = game.Players.LocalPlayer
local auto = game.Players.LocalPlayer:GetAttribute("Auto")
local button = script.Parent
button.MouseButton1Click:Connect(function()
if auto == true or button.BackgroundColor3 == Color3.fromRGB(100, 255, 100) then
game.ReplicatedStorage.Remotes.DisableAuto:FireServer(player)
button.Text = "Auto: OFF"
button.BackgroundColor3 = Color3.fromRGB(255, 0, 0)
else
game.ReplicatedStorage.Remotes.EnableAuto:FireServer(player)
button.Text = "Auto: ON"
button.BackgroundColor3 = Color3.fromRGB(100, 255, 100)
end
end)
game.Players.LocalPlayer:GetAttributeChangedSignal("Auto"):Connect(function()
auto = game.Players.LocalPlayer:GetAttribute("Auto")
end)```
just do this bro
#Button Problem
5 messages · Page 1 of 1 (latest)