Guest User

help

a guest
Jul 24th, 2019
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. local ToolNames = {"Immunity Idol"}
  2. local Storage = game:GetService("ServerStorage")
  3.  
  4. local Part = script.Parent
  5. local ClickDetector = Part:WaitForChild("ClickDetector")
  6.  
  7.  
  8. ClickDetector.MouseClick:connect(function(Player)
  9. if Player and Player.Character then
  10. local Backpack = Player:WaitForChild("Backpack")
  11. for i = 1, #ToolNames do
  12. local Tool = Storage:FindFirstChild(ToolNames[i])
  13. if Tool then
  14. Tool:clone().Parent = Backpack
  15. game.StarterGui.Idol.Holder.Text = Player.Name
  16. end
  17. end
  18. end
  19. end)
Advertisement
Add Comment
Please, Sign In to add comment