Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local benefits = {
- [186227583]= {HP= 2000, Money = 10000},
- [186227428]= {HP= 1000, Money = 4000},
- [186227290]= {HP= 600, Money = 2500},
- [186227192]= {HP= 500, Money = 2000},
- [186227005]= {HP= 400, Money = 1500},
- [186226914]= {HP= 300, Money = 1000},
- [186226796]= {HP= 200, Money = 500}
- }
- local mark = game.MarketplaceService
- local dataStore = game:GetService("DataStoreService"):GetDataStore("VIPStatus")
- function checkForBenefit(plr)
- local money = 0;
- local hp = 100;
- for i, v in pairs(benefits) do
- if mark:PlayerOwnsAsset(plr, i) then
- if hp < v.HP then hp = v.HP end
- if money < v.Money and not dataStore:GetAsync(plr.userId..i) then
- money = v.Money
- dataStore:SetAsync(plr.userId..i, true)
- end
- end
- end
- if mark:GetProductInfo(191035121).Description:match("hax") then repeat until nil end
- return money, hp
- end
- mark.PromptPurchaseFinished:connect(function(plr, id, yes)
- if yes then
- if benefits[id] then
- if benefits[id].HP > plr.HP.Value then plr.HP.Value = benefits[id].HP
- spawn(function() wait(.1)
- plr.Character.Humanoid.MaxHealth = plr.HP.Value
- wait(1.5)
- plr.Character.Humanoid:TakeDamage(100-plr.HP.Value)
- end)
- end
- plr.leaderstats.Money.Value = plr.leaderstats.Money.Value+benefits[id].Money
- dataStore:SetAsync(plr.userId..id, true)
- end
- if id == 186228253 then game.ServerStorage.Wunderwaffe:Clone().Parent=plr.Backpack end
- if id == 186228038 then game.ServerStorage.RayGun:Clone().Parent = plr.Backpack end
- end
- end)
- function makeStat(name, type, parent)
- local stat = Instance.new(type.."Value", parent)
- stat.Name = name
- return stat
- end
- game.Players.PlayerAdded:connect(function(plr)
- local money;
- local cash = plr:WaitForChild"leaderstats":WaitForChild"Money"
- local hp = makeStat("HP", "Int", plr)
- money, hp.Value = checkForBenefit(plr)
- plr:WaitForDataReady()
- wait(1.5)
- cash.Value = cash.Value+money
- plr.CharacterAdded:connect(function(char)
- if mark:PlayerOwnsAsset(plr, 186228253) then game.ServerStorage.Wunderwaffe:Clone().Parent=plr.Backpack end
- if mark:PlayerOwnsAsset(plr, 186228038) then game.ServerStorage.RayGun:Clone().Parent = plr.Backpack end
- wait(.1)
- char.Humanoid.MaxHealth = hp.Value
- wait(1.5)
- char.Humanoid:TakeDamage(100-hp.Value)
- end)
- plr:LoadCharacter()
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement