hawoody

Freeze

Apr 24th, 2018
223
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.72 KB | None | 0 0
  1. Player = game:GetService("Players").LocalPlayer
  2. Character = Player.Character
  3. Torso = Character["Torso"]
  4. Head = Character["Head"]
  5. RightArm = Character["Right Arm"]
  6. LeftArm = Character["Left Arm"]
  7. RightLeg = Character["Right Leg"]
  8. LeftLeg = Character["Left Leg"]
  9. BRICKC = BrickColor.new
  10. MRANDOM = math.random
  11. function CreateSound(ID, PARENT, VOLUME, PITCH)
  12. local NEWSOUND = nil
  13. coroutine.resume(coroutine.create(function()
  14. NEWSOUND = IT("Sound", PARENT)
  15. NEWSOUND.Volume = VOLUME
  16. NEWSOUND.Pitch = PITCH
  17. NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID
  18. Swait()
  19. NEWSOUND:play()
  20. game:GetService("Debris"):AddItem(NEWSOUND, 10)
  21. end))
  22. return NEWSOUND
  23. end
  24. function goldify(hit)
  25. local GOLDNAMES = {"Gold","Shiny rock","Munz","$$"}
  26. hit.Anchored = false
  27. hit.CanCollide = true
  28. hit.Parent = workspace
  29. hit.Name = GOLDNAMES[MRANDOM(1,#GOLDNAMES)]
  30. hit.Material = "Glass"
  31. hit.BrickColor = BRICKC("White")
  32. if hit:FindFirstChildOfClass("SpecialMesh") then
  33. local mesh = hit:FindFirstChildOfClass("SpecialMesh")
  34. mesh.TextureId = ""
  35. end
  36. if hit:FindFirstChildOfClass("Decal") then
  37. local mesh = hit:FindFirstChildOfClass("Decal")
  38. mesh:remove()
  39. end
  40. if hit.ClassName == "MeshPart" then
  41. hit.TextureID = ""
  42. end
  43. if hit.ClassName == "UnionOperation" then
  44. hit.UsePartColor = true
  45. end
  46. end
  47. function turntogold(hit)
  48. if hit.Parent ~= Character then
  49. if hit.Parent ~= workspace then
  50. print("mine...")
  51. local body = hit.Parent:GetChildren()
  52. for part = 1, #body do
  53. local child = body[part]
  54. if child.ClassName == "Part" or child.ClassName == "MeshPart" or child.ClassName == "UnionOperation" then
  55. if child.Name == "Head" then
  56. CreateSound("972134931", child, 2, 1)
  57. end
  58. goldify(child)
  59. elseif child.ClassName == "Accessory" or child.ClassName == "Hat" then
  60. if child:FindFirstChild("Handle") then
  61. goldify(child.Handle)
  62. end
  63. end
  64. end
  65. else
  66. goldify(hit)
  67. end
  68. end
  69. end
  70. local hit = Torso.Touched:Connect(function(hit)
  71. if hit.Parent:FindFirstChild("Humanoid") then
  72. turntogold(hit)
  73. end
  74. end)
  75. local hit = RightArm.Touched:Connect(function(hit)
  76. if hit.Parent:FindFirstChild("Humanoid") then
  77. turntogold(hit)
  78. end
  79. end)
  80. local hit = LeftArm.Touched:Connect(function(hit)
  81. if hit.Parent:FindFirstChild("Humanoid") then
  82. turntogold(hit)
  83. end
  84. end)
  85. local hit = RightLeg.Touched:Connect(function(hit)
  86. if hit.Parent:FindFirstChild("Humanoid") then
  87. turntogold(hit)
  88. end
  89. end)
  90. local hit = LeftLeg.Touched:Connect(function(hit)
  91. if hit.Parent:FindFirstChild("Humanoid") then
  92. turntogold(hit)
  93. end
  94. end)
  95. local hit = Head.Touched:Connect(function(hit)
  96. if hit.Parent:FindFirstChild("Humanoid") then
  97. turntogold(hit)
  98. end
  99. end)
Add Comment
Please, Sign In to add comment