Can someone with a good heart help me with a script, how do I transform this script into a table, as it is exeding the datastore requests
Script:
--PVP System
Bounty.Value = Bounty1:GetAsync(Plr.UserId) or Bounty.Value
Bounty1:SetAsync(Plr.UserId, Bounty.Value)
Bounty.Changed:connect(function()
Bounty1:SetAsync(Plr.UserId, Bounty.Value)
end)
--PVP System
PvpSystem.Value = PvpSystem1:GetAsync(Plr.UserId) or PvpSystem.Value
PvpSystem1:SetAsync(Plr.UserId, PvpSystem.Value)
PvpSystem.Changed:connect(function()
PvpSystem1:SetAsync(Plr.UserId, PvpSystem.Value)
end)
--- Levels
Levels.Value = Level1:GetAsync(Plr.UserId) or Levels.Value
Level1:SetAsync(Plr.UserId, Levels.Value)
Levels.Changed:connect(function()
Level1:SetAsync(Plr.UserId, Levels.Value)
end)
--- Gold
Beli.Value = Beli11:GetAsync(Plr.UserId) or Beli.Value
Beli11:SetAsync(Plr.UserId, Beli.Value)
Beli.Changed:connect(function()
Beli11:SetAsync(Plr.UserId, Beli.Value)
end)
-- Gems
Gems.Value = Gems1:GetAsync(Plr.UserId) or Gems.Value
Gems1:SetAsync(Plr.UserId, Gems.Value)
Gems.Changed:connect(function()
Gems1:SetAsync(Plr.UserId, Gems.Value)
end)
--- Exp
Exp.Value = Exp1:GetAsync(Plr.UserId) or Exp.Value
Exp1:SetAsync(Plr.UserId, Exp.Value)
Exp.Changed:connect(function()
Exp1:SetAsync(Plr.UserId, Exp.Value)
end)
--- ExpNeed
ExpNeed.Value = ExpNeed1:GetAsync(Plr.UserId) or ExpNeed.Value
ExpNeed1:SetAsync(Plr.UserId, ExpNeed.Value)
ExpNeed.Changed :connect(function()
ExpNeed1:SetAsync(Plr.UserId, ExpNeed.Value)
end)
--- HealthAdd
HealthAdd.Value = HealthAdd1:GetAsync(Plr.UserId) or HealthAdd.Value
HealthAdd1:SetAsync(Plr.UserId, HealthAdd.Value)
HealthAdd.Changed:connect(function()
HealthAdd1:SetAsync(Plr.UserId, HealthAdd.Value)
end)
--- SwordP
SwordP.Value = SwordP1:GetAsync(Plr.UserId) or SwordP.Value
SwordP1:SetAsync(Plr.UserId, SwordP.Value)
SwordP.Changed:connect(function()
SwordP1:SetAsync(Plr.UserId, SwordP.Value)
end)
--- DefenseP
DefenseP.Value = DefenseP1:GetAsync(Plr.UserId) or DefenseP.Value
DefenseP1:SetAsync(Plr.UserId, DefenseP.Value)
DefenseP.Changed:connect(function()
DefenseP1:SetAsync(Plr.UserId, DefenseP.Value)
end)
--- Sword
Sword.Value = Sword1:GetAsync(Plr.UserId) or Sword.Value
Sword1:SetAsync(Plr.UserId, SwordP.Value)
Sword.Changed:connect(function()
Sword1:SetAsync(Plr.UserId, SwordP.Value)
end)
--- Defense
Defense.Value = Defense1:GetAsync(Plr.UserId) or Defense.Value
Defense1:SetAsync(Plr.UserId, Defense.Value)
Defense.Changed:connect(function()
Defense1:SetAsync(Plr.UserId, Defense.Value)
end)
--- Luck
Luck.Value = Luck1:GetAsync(Plr.UserId) or Luck.Value
Luck1:SetAsync(Plr.UserId, Luck.Value)
Luck.Changed:connect(function()
Luck1:SetAsync(Plr.UserId, Luck.Value)
end)
--- Special
Special.Value = Special1:GetAsync(Plr.UserId) or Special.Value
Special1:SetAsync(Plr.UserId, Special.Value)
Special.Changed:connect(function()
Special1:SetAsync(Plr.UserId, Special.Value)
end)
--- Points
Points.Value = Points1:GetAsync(Plr.UserId) or Points.Value
Points1:SetAsync(Plr.UserId, Points.Value)
Points.Changed:connect(function()
Points1:SetAsync(Plr.UserId, Points.Value)
end)