explore
key systems
new
docs
discord
search scripts
⌘K
explore
key systems
new
docs
discord
sign in
⌘↵
--
publishes from anywhere on this page
new paste
untitled.luau
empty
/ 512kb
open file
⌘O
explore
key systems
new
docs
sign in
supernic-copy.lua
49 lines · 1kb
/ 512kb
open file
⌘O
```lua local tree = script.Supernic local prompt = tree:WaitForChild("ProximityPrompt") local COINS_PER_TREE = 10 local COOLDOWN = 5 local stolen = false prompt.Triggered:Connect(function(player) if stolen then return end stolen = true prompt.Enabled = false -- Create leaderstats if they do not exist local leaderstats = player:FindFirstChild("leaderstats") if not leaderstats then leaderstats = Instance.new("Folder") leaderstats.Name = "leaderstats" leaderstats.Parent = player local coins = Instance.new("IntValue") coins.Name = "Coins" coins.Value = 0 coins.Parent = leaderstats end local coins = leaderstats:FindFirstChild("Coins") if coins then coins.Value += COINS_PER_TREE end -- Hide the stolen tree tree.Transparency = 1 tree.CanCollide = false task.wait(COOLDOWN) -- Respawn the tree tree.Transparency = 0 tree.CanCollide = true prompt.Enabled = true stolen = false end) ```