Advertisement
Sungmingamerpro13

lock Windows System

Mar 19th, 2024 (edited)
616
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 0.60 KB | None | 0 0
  1. local number = script.Parent.PlanksInWIndow
  2. local Maxnumber = 10
  3.  
  4. local WoodsGui = script.Parent.WoodsGui
  5.  
  6. local Proximity = script.Parent.Proximity
  7.  
  8. Proximity.Triggered:Connect(function(player)
  9.  
  10.     local Plank = player.Character:FindFirstChild("Plank")
  11.  
  12.     if Plank then
  13.         number.Value += 1
  14.         Plank.stacks.Value -= 1
  15.        
  16.         WoodsGui.TextLabel.Text = "Planks: "..number.Value.." / "..Maxnumber
  17.        
  18.         if number.Value == Maxnumber then
  19.             script.Parent.Transparency = 0
  20.             Proximity.Enabled = false
  21.         end
  22.     end
  23.  
  24.     while wait() do
  25.         if number == Maxnumber then
  26.             wait(1)
  27.             break
  28.         end
  29.     end
  30. end)
  31.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement