The purpose of this script is that, if a player has 50 dollars, it will remove 5o dollars from them and team them to the civilian team, then reset them. if they don't have 5o dollars, it gives an 'insufficient funds' message.
local plr = game.Players.LocalPlayer if plr.leaderstats.Money.Value <= 50 then script.Parent.MouseButton1Click:Connect(function() plr.leaderstats.Money.Value = plr.leaderstats.Money.Value-50 plr.TeamColor = BrickColor.new("Bright blue") wait(1) plr.Character.Humanoid.Health = 0 end) else script.Parent.MouseButton1Click:Connect(function() game.StarterGui.InsufficientFunds.TextLabel.Visible = true wait(5) game.StarterGui.InsufficientFunds.TextLabel.Visible = false end)