Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Rarities = require(game.ServerScriptService:WaitForChild("petModule"))
- script.Parent.ClickDetector.MouseClick:Connect(function(player)
- if player.leaderstats.Coins.Value >= 500 then
- player.leaderstats.Coins.Value = player.leaderstats.Coins.Value - 500
- local pet = Rarities.chooseRandomPet()
- print(pet.Name.." selected")
- local petVal = Instance.new("StringValue")
- petVal.Name = pet.Name
- petVal.Parent = player.PetInventory
- game.ReplicatedStorage.HatchEgg:FireClient(player,pet)
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement