Save An Egg Script by SuperNic

-- EggPart -> EggSaveScript local eggPart = script.Parent local prompt = eggPart:WaitForChild("ProximityPrompt") local EGG_COST = 10 -- Price to save/hatch the egg prompt.Triggered:Connect(function(player) local leaderstats = player:FindFirstChild("leaderstats") if not leaderstats then return end local coins = leaderstats:FindFirstChild("Coins") local eggsSaved = leaderstats:FindFirstChild("EggsSaved") if coins and eggsSaved then if coins.Value >= EGG_COST then -- Deduct cost and reward player coins.Value = coins.Value - EGG_COST eggsSaved.Value = eggsSaved.Value + 1 -- Visual feedback (Egg shrinks momentarily) eggPart.Size = eggPart.Size - Vector3.new(0.5, 0.5, 0.5) task.wait(0.2) eggPart.Size = eggPart.Size + Vector3.new(0.5, 0.5, 0.5) print(player.Name .. " successfully saved an egg!") else -- Not enough coins notification/feedback warn(player.Name .. " does not have enough coins!") end end end) -- ServerScriptService -> Leaderstats game.Players.PlayerAdded:Connect(function(player) -- Create leaderstats folder local leaderstats = Instance.new("Folder") leaderstats.Name = "leaderstats" leaderstats.Parent = player -- Create Coins currency local coins = Instance.new("IntValue") coins.Name = "Coins" coins.Value = 100 -- Starting coins for testing coins.Parent = leaderstats -- Create EggsSaved stat local eggsSaved = Instance.new("IntValue") eggsSaved.Name = "EggsSaved" eggsSaved.Value = 0 eggsSaved.Parent = leaderstats end)

loadstring(game:HttpGet("https://pasteblox.com/raw/gy8pe9hmxx"))()
pbx pull gy8pe9hmxxraw link never changes · v1 live
save-an-egg-script-by-supernic.lua32 lines · key protected

this script needs a key

run the loadstring in your executor. a key screen pops up in game: hit get key, clear the checkpoints in your browser, then paste the key and hit redeem key.

get a key

changelog

1 version
  1. first version

    live

    @ncrizare·