Advertisement
Sungmingamerpro13

Planks (Give Tool)

Apr 4th, 2024 (edited)
608
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 0.55 KB | None | 0 0
  1. local Debounce = false
  2.  
  3. script.Parent.ClickDetector.MouseClick:Connect(function(player)
  4.     game.ServerStorage.ItemsFolder.Plank:Clone().Parent = player.Backpack
  5. end)
  6.  
  7. script.Parent.Touched:Connect(function(Hit)
  8.     if Hit.Parent:FindFirstChild("Humanoid") then
  9.         if Debounce == false then
  10.            
  11.             Debounce = true
  12.            
  13.             local character = Hit.Parent
  14.             local Player = game.Players:GetPlayerFromCharacter(character)
  15.            
  16.             game.ServerStorage.ItemsFolder.Plank:Clone().Parent = Player.Backpack
  17.            
  18.             wait(.5)
  19.            
  20.             Debounce = false
  21.         end
  22.     end
  23. end)
Tags: Roblox
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement