The title explains it all, but I accept any answer that can help meh. Thank youuuu
local debounce = false
local plr = game.Players.LocalPlayer
script.Parent.Touched:connect(function(hit)
if hit.Name == "ABL_Ball" or hit.Parent:IsA("Tool") then
if not debounce then
debounce = true
local look = hit.Parent:FindFirstChild("BallHandler").Value
local found = game.Players:FindFirstChild(look)
local cash = found:FindFirstChild("leaderstats")
cash.XP.Value = cash.XP.Value + 5
print("Gave +1 SM")
wait(1)
debounce = false
end
elseif plr:IsInGroup(3164314) then --it might be best to use game.Players.PlayerAdded but idk how to gg
if hit.Name == "ABL_Ball" or hit.Parent:IsA("Tool") then
local look = hit.Parent:FindFirstChild("BallHandler").Value
local found = game.Players:FindFirstChild(look)
local cash = found:FindFirstChild("leaderstats")
cash.XP.Value = cash.XP.Value + 10
end
end
end)
Thanks,
LukeGabrieI aka EnergyBrickz
