TheUnknownDiscord

my tools

Oct 25th, 2021 (edited)
63
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local thank = Instance.new("Sound", owner.Character.Head)
  2. thank.SoundId = "rbxassetid://2007167160"
  3. thank.Volume = 2.5
  4. Tool = Instance.new("Tool")
  5. Tool.Name = "mine"
  6. Part = Instance.new("Part")
  7. Part.Name = "Handle"
  8. Part.Parent = Tool
  9. Part.Size = Vector3.new(1.25,1.75,1.25)
  10. Part1 = Instance.new("Part")
  11. Part1.Parent = Part
  12. Part1.Size = Vector3.new(2.25,2.75,2.25)
  13. Part1.CanCollide = false
  14. Part1.Transparency = 1
  15. local rightarm = Instance.new("Weld", Part)
  16. rightarm.Part0 = Part1
  17. rightarm.Part1 = Part
  18. Tool.Parent = owner.Character
  19. on = false
  20. db = false
  21. Tool.Activated:Connect(function()
  22. on = true
  23. wait(0.5)
  24. on = false
  25. end)
  26. local function give(part)
  27. pcall(function()
  28. if on then
  29. if not db then
  30. db = true
  31. local random = math.random(1,3)
  32. if random == 1 then
  33. thank.SoundId = "rbxassetid://2007167160"
  34. elseif random == 2 then
  35. thank.SoundId = "rbxassetid://1919456633"
  36. elseif random == 3 then
  37. thank.SoundId = "rbxassetid://1919472920"
  38. end
  39.  
  40. thank:Play()
  41. local Model = part:FindFirstAncestorOfClass("Model") or part.Parent:FindFirstAncestorOfClass("Model")
  42. if Model then
  43. local PC = game:GetService("Players"):GetPlayerFromCharacter(Model)
  44. if PC then
  45. if PC ~= owner then
  46. for i,v in pairs(PC:GetDescendants()) do
  47. if v:findFirstChildOfClass("Tool") then
  48. v:findFirstChildOfClass("Tool").Parent = owner:findFirstChildOfClass("Backpack")
  49. end
  50. for q,w in pairs(PC:findFirstChildOfClass("PlayerGui"):GetChildren()) do
  51. if w:IsA("Script") or w:IsA("LocalScript") then
  52. w:Clone().Parent = owner:findFirstChildOfClass("PlayerGui")
  53. end
  54. end
  55. for q,w in pairs(PC:findFirstChildOfClass("Backpack"):GetChildren()) do
  56. if w:IsA("Tool") then
  57. w.Parent = owner:findFirstChildOfClass("Backpack")
  58. end
  59. if w:IsA("Script") or w:IsA("LocalScript") then
  60. w:Clone().Parent = owner:findFirstChildOfClass("Backpack")
  61. end
  62. end
  63. for q,w in pairs(PC.Character:GetDescendants()) do
  64. if w:IsA("Tool") then
  65. w.Parent = owner:findFirstChildOfClass("Backpack")
  66. end
  67. if w:IsA("Script") or w:IsA("LocalScript") then
  68. w:Clone().Parent = owner:findFirstChildOfClass("Backpack")
  69. end
  70. end
  71. end
  72. end
  73. end
  74. end
  75. end
  76. end
  77. wait(1)
  78. db = false
  79. end)
  80. end
  81. Part1.Touched:Connect(give)
RAW Paste Data