Advertisement
ZKiller

Hammer Guy Script [ROBLOX]

Jun 27th, 2018
379
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.43 KB | None | 0 0
  1. wait(.3)
  2. local mouse = game.Players.LocalPlayer:GetMouse()
  3. local damagePart = nil
  4. local pose = "idle"
  5. local char = game.Players.LocalPlayer.Character
  6. local sound1 = Instance.new("Sound",char.Torso)
  7. sound1.SoundId = "rbxassetid://1947096553"
  8. sound1.PlayOnRemove = true
  9. local sound2 = Instance.new("Sound",char.Torso)
  10. sound2.SoundId = "rbxassetid://158037267"
  11. sound2.PlayOnRemove = true
  12. local music = Instance.new("Sound",char.Head)
  13. music.SoundId = "rbxassetid://1845798444"
  14. music.Looped = true
  15. music:Play()
  16. music.Volume = 1
  17. char.Humanoid.WalkSpeed = 0
  18. char.Animate.Disabled = true
  19. char.Humanoid:LoadAnimation(char.Animate.idle.Animation1):Play()
  20. char.Humanoid.WalkSpeed = 22
  21. char.Humanoid.MaxHealth = math.huge
  22. char.Humanoid.Health = math.huge
  23. local name = Instance.new("BillboardGui",char.Head)
  24. name.Size = UDim2.new(3,0,1,0)
  25. name.LightInfluence = 0
  26. name.StudsOffset = Vector3.new(0,2,0)
  27. local nameText = Instance.new("TextLabel",name)
  28. nameText.Size = UDim2.new(1,0,1,0)
  29. nameText.BackgroundTransparency = 1
  30. nameText.TextScaled = true
  31. nameText.TextStrokeTransparency = 0
  32. nameText.TextColor3 = Color3.new(0,0,0)
  33. nameText.TextStrokeColor3 = Color3.new(255,255,255)
  34. nameText.Text = "Hammer Guy"
  35. local CannonModel = Instance.new("Model",game.Players.LocalPlayer.Character)
  36. CannonModel.Name = "Hammer"
  37. function rig(motor,C0,C1,angle,vel)
  38. motor.C0 = C0
  39. motor.C1 = C1
  40. motor.DesiredAngle = angle
  41. motor.MaxVelocity = vel
  42. end
  43. function newPart(size,color,material,shape,weldPart,position,parent,ltm,isDamage)
  44. local part = Instance.new("Part",parent)
  45. part.CanCollide = false
  46. part.Color = color
  47. part.Material = material
  48. part.Shape = shape
  49. part.Size = size
  50. part.LocalTransparencyModifier = ltm
  51. local partWeld = Instance.new("Weld",part)
  52. partWeld.Part0 = weldPart
  53. partWeld.Part1 = part
  54. partWeld.C1 = position
  55. if isDamage == true then
  56. damagePart = part
  57. end
  58. end
  59. rig(char.Torso["Right Shoulder"],CFrame.new(0,0,0)*CFrame.fromEulerAnglesXYZ(math.rad(0),math.rad(0),math.rad(0)),CFrame.new(-1,.5,1)*CFrame.fromEulerAnglesXYZ(math.rad(-90),math.rad(-15),math.rad(45)),0,-1)
  60. rig(char.Torso["Left Shoulder"],CFrame.new(0,0,0)*CFrame.fromEulerAnglesXYZ(math.rad(0),math.rad(0),math.rad(0)),CFrame.new(1,.5,0)*CFrame.fromEulerAnglesXYZ(math.rad(-90),math.rad(45),math.rad(30)),0,-1)
  61. newPart(Vector3.new(5,.5,5),Color3.fromRGB(106,57,9),Enum.Material.Wood,Enum.PartType.Cylinder,char["Right Arm"],CFrame.new(1,0,1)*CFrame.fromEulerAnglesXYZ(math.rad(0),math.rad(90),math.rad(90)),CannonModel,0,false)
  62. newPart(Vector3.new(1,1,2),Color3.fromRGB(204,142,105),Enum.Material.Marble,Enum.PartType.Block,char["Right Arm"],CFrame.new(0,-2.8,1)*CFrame.fromEulerAnglesXYZ(math.rad(90),math.rad(0),math.rad(0)),CannonModel,0,true)
  63. function damage(hit)
  64. local h = hit.Parent:findFirstChildOfClass("Humanoid")
  65. if h ~= nil then
  66. local sound = sound1:Clone()
  67. sound.Parent = char.Head
  68. hit.Velocity = damagePart.CFrame.upVector *100
  69. h.Health = h.Health - 100
  70. wait()
  71. sound.Parent = nil
  72. end
  73. end
  74. damagePart.Touched:connect(damage)
  75. function attack()
  76. sound2:Play()
  77. rig(char.Torso["Right Shoulder"],CFrame.new(0,0,0)*CFrame.fromEulerAnglesXYZ(math.rad(0),math.rad(0),math.rad(0)),CFrame.new(-1,.5,1)*CFrame.fromEulerAnglesXYZ(math.rad(-90),math.rad(-15),math.rad(45)),0,-1)
  78. rig(char.Torso["Left Shoulder"],CFrame.new(0,0,0)*CFrame.fromEulerAnglesXYZ(math.rad(0),math.rad(0),math.rad(0)),CFrame.new(1,.5,0)*CFrame.fromEulerAnglesXYZ(math.rad(-90),math.rad(45),math.rad(30)),0,-1)
  79. wait(.01)
  80. rig(char.Torso["Right Shoulder"],CFrame.new(0,0,0)*CFrame.fromEulerAnglesXYZ(math.rad(0),math.rad(0),math.rad(0)),CFrame.new(-1,.5,1)*CFrame.fromEulerAnglesXYZ(math.rad(-75),math.rad(-15),math.rad(45)),0,-1)
  81. rig(char.Torso["Left Shoulder"],CFrame.new(0,0,0)*CFrame.fromEulerAnglesXYZ(math.rad(0),math.rad(0),math.rad(0)),CFrame.new(1,.5,0)*CFrame.fromEulerAnglesXYZ(math.rad(-75),math.rad(45),math.rad(30)),0,-1)
  82. wait(.01)
  83. rig(char.Torso["Right Shoulder"],CFrame.new(0,0,0)*CFrame.fromEulerAnglesXYZ(math.rad(0),math.rad(0),math.rad(0)),CFrame.new(-1,.5,1)*CFrame.fromEulerAnglesXYZ(math.rad(-60),math.rad(-15),math.rad(45)),0,-1)
  84. rig(char.Torso["Left Shoulder"],CFrame.new(0,0,0)*CFrame.fromEulerAnglesXYZ(math.rad(0),math.rad(0),math.rad(0)),CFrame.new(1,.5,0)*CFrame.fromEulerAnglesXYZ(math.rad(-60),math.rad(45),math.rad(30)),0,-1)
  85. wait(.01)
  86. rig(char.Torso["Right Shoulder"],CFrame.new(0,0,0)*CFrame.fromEulerAnglesXYZ(math.rad(0),math.rad(0),math.rad(0)),CFrame.new(-1,.5,1)*CFrame.fromEulerAnglesXYZ(math.rad(-30),math.rad(-15),math.rad(45)),0,-1)
  87. rig(char.Torso["Left Shoulder"],CFrame.new(0,0,0)*CFrame.fromEulerAnglesXYZ(math.rad(0),math.rad(0),math.rad(0)),CFrame.new(1,.5,0)*CFrame.fromEulerAnglesXYZ(math.rad(-30),math.rad(45),math.rad(30)),0,-1)
  88. wait(.01)
  89. rig(char.Torso["Right Shoulder"],CFrame.new(0,0,0)*CFrame.fromEulerAnglesXYZ(math.rad(0),math.rad(0),math.rad(0)),CFrame.new(-.5,.5,.5)*CFrame.fromEulerAnglesXYZ(math.rad(-45),math.rad(-15),math.rad(75)),0,-1)
  90. rig(char.Torso["Left Shoulder"],CFrame.new(0,0,0)*CFrame.fromEulerAnglesXYZ(math.rad(0),math.rad(0),math.rad(0)),CFrame.new(1,.5,-.5)*CFrame.fromEulerAnglesXYZ(math.rad(-75),math.rad(0),math.rad(30)),0,-1)
  91. wait(.01)
  92. rig(char.Torso["Right Shoulder"],CFrame.new(0,0,0)*CFrame.fromEulerAnglesXYZ(math.rad(0),math.rad(0),math.rad(0)),CFrame.new(-1,.5,1)*CFrame.fromEulerAnglesXYZ(math.rad(-30),math.rad(-15),math.rad(45)),0,-1)
  93. rig(char.Torso["Left Shoulder"],CFrame.new(0,0,0)*CFrame.fromEulerAnglesXYZ(math.rad(0),math.rad(0),math.rad(0)),CFrame.new(1,.5,0)*CFrame.fromEulerAnglesXYZ(math.rad(-30),math.rad(45),math.rad(30)),0,-1)
  94. wait(.01)
  95. rig(char.Torso["Right Shoulder"],CFrame.new(0,0,0)*CFrame.fromEulerAnglesXYZ(math.rad(0),math.rad(0),math.rad(0)),CFrame.new(-1,.5,1)*CFrame.fromEulerAnglesXYZ(math.rad(-75),math.rad(-15),math.rad(45)),0,-1)
  96. rig(char.Torso["Left Shoulder"],CFrame.new(0,0,0)*CFrame.fromEulerAnglesXYZ(math.rad(0),math.rad(0),math.rad(0)),CFrame.new(1,.5,0)*CFrame.fromEulerAnglesXYZ(math.rad(-75),math.rad(45),math.rad(30)),0,-1)
  97. wait(.01)
  98. rig(char.Torso["Right Shoulder"],CFrame.new(0,0,0)*CFrame.fromEulerAnglesXYZ(math.rad(0),math.rad(0),math.rad(0)),CFrame.new(-1,.5,1)*CFrame.fromEulerAnglesXYZ(math.rad(-90),math.rad(-15),math.rad(45)),0,-1)
  99. rig(char.Torso["Left Shoulder"],CFrame.new(0,0,0)*CFrame.fromEulerAnglesXYZ(math.rad(0),math.rad(0),math.rad(0)),CFrame.new(1,.5,0)*CFrame.fromEulerAnglesXYZ(math.rad(-90),math.rad(45),math.rad(30)),0,-1)
  100. end
  101. mouse.Button1Down:connect(attack)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement