Advertisement
Sungmingamerpro13

ToolScript

Feb 5th, 2023
1,318
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 0.40 KB | None | 0 0
  1. local tool  = script.Parent
  2.  
  3. local click = tool.Main.ClickDetector
  4.  
  5.  
  6.  
  7. local ServerStorage = game:GetService('ServerStorage')
  8.  
  9. local toolsFolder = ServerStorage:WaitForChild('Tools')
  10.  
  11.  
  12.  
  13. local function giveTool(player)
  14.  
  15.     local newTool = toolsFolder[tool.Name]:Clone()
  16.  
  17.     newTool.Handle.Anchored = false
  18.  
  19.     newTool.Parent = player.Backpack
  20.  
  21. end
  22.  
  23.  
  24.  
  25. click.MouseClick:Connect(giveTool)
  26.  
  27.  
Tags: Roblox
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement