✓ Accepted answer
Hello, kexiGamer!
You have to use this script:
function onClicked()
for _, player in ipairs(game.Players:GetPlayers()) do
if player.Backpack:FindFirstChild("Blue Master Key") and player.Backpack:FindFirstChild("Blue Master Key"):IsA("Tool") then
player.Cash.Cash.Value = player.Cash.Cash.Value + 2000
end
if game.Worspace[player.Name]:FindFirstChild("Blue Master Key") and player.Backpack:FindFirstChild("Blue Master Key"):IsA("Tool") then
player.Cash.Cash.Value = player.Cash.Cash.Value + 2000
end
end
end)
script.Parent.ClickDetector.MouseClick:connect(onClicked)
Attention: This script will change the money value of ALL players
This another one jsut changes the stats of who clicked!
function onClicked(Clicker)
if Clicker.Backpack:FindFirstChild("Blue Master Key") and Clicker.Backpack:FindFirstChild("Blue Master Key"):IsA("Tool") then
Clicker.Cash.Cash.Value = Clicker.Cash.Cash.Value + 2000
end
if game.Workspace[Clicker.Name]:FindFirstChild("Blue Master Key") and Clicker.Backpack:FindFirstChild("Blue Master Key"):IsA("Tool") then
Clicker.Cash.Cash.Value = Clicker.Cash.Cash.Value + 2000
end
end
script.Parent.ClickDetector.MouseClick:connect(onClicked)
Good Luck with your games!
4 comments
Thanx for your time but I only need to change value of 1 player
Maby u can change that one? so I can accept your answer
Edited!
Secconf one works like a charm m8! Big thanx!