Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ----------------------------Server Handler---------------------------
- local area_prices = {
- ["Area1"] = 1000,
- ["Area2"] = 1000,
- ["Area3"] = 1000,
- ["Area4"] = 1000,
- }
- local function purchase_area(player, area, gem)
- if player and area and area_price[area] then
- local stat
- if gem == false then
- stat = player.Data:WaitForChild("Coins")
- if stat.Value >= area_price[area] then
- stat.Value = stat.Value - area_price[area]
- player.Data.Areas:FindFirstChild(area).Value = 1
- end
- else
- stat = player.Data:WaitForChild("Gems")
- if stat.Value >= area_price[area]/100 then
- stat.Value = stat.Value - area_price[area]/100
- player.Data.Areas:FindFirstChild(area).Value = 1
- end
- end
- end
- end
- local function tele(player, area)
- if player and area then
- if player.Data.Areas:FindFirstChild(area).Value == true then
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement