NOTE: If you are going to message : "We are not going to do this script for you, you lazy person. Get out SH," i'd respect your opinion but ignore it. I tried my hardest to make it and I even made notes on where I need help with. If you simply don't want to help, don't reply. If you want to help on some part of the script, fix only the one part you choose, I'd appreciate that too. Thanks :)
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
Ok so in the below I made a client only debounce, it looks for the datastore and the leaderboard, checks if both >= the price and then takes it away. There are many buggs and all help would be appreciated.
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
local PartyPoints = game:GetService("DataStoreService"):GetOrderedDataStore("Party Points")
function DebounceChange(plr, active)
getfenv(0)[plr.Name .. "_Debounce"] = active
end
function DebounceRetrieve(plr)
return getfenv(0)[plr.Name .. "_Debounce"]
end
game.Players.PlayerAdded:connect(onPlayerEntered)
if PartyPoints:GetAsync() == nil then
PartyPoints:SetAsync()
else
--How do I update the stats to the leaderboard? I have a datastore but a leaderboard too.
end
function onTouch(hit)
if DebounceRetrieve(h) == true then
DebounceChange()
end
if hit.Leaderstat > 500 then
hit.Leaderstat == hit.Leaderstat - 500
aa = game.ServerStorage.ITEM:clone()
aa.Parent = hit -- IK HIT ISN'T THE RIGHT PHRASE SO PLEASE TELL ME WHAT IS
--save item in inventory
else
bb = game.Servestorage.NOTENOUGHGUI:clone()
bb.Parent = hit.GUI -- HOW TO MAKE IT A CLIENT ONLY GUI!?!?!??!?!
end
wait(3)
if DebounceRetrieve(h) == false then
DebounceChange()
end
end |