Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local number = script.Parent.PlanksInWIndow
- local Maxnumber = 10
- local WoodsGui = script.Parent.WoodsGui
- local Proximity = script.Parent.Proximity
- Proximity.Triggered:Connect(function(player)
- local Plank = player.Character:FindFirstChild("Plank")
- if Plank then
- number.Value += 1
- Plank.stacks.Value -= 1
- WoodsGui.TextLabel.Text = "Planks: "..number.Value.." / "..Maxnumber
- if number.Value == Maxnumber then
- script.Parent.Transparency = 0
- Proximity.Enabled = false
- end
- end
- while wait() do
- if number == Maxnumber then
- wait(1)
- break
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement