Advertisement
lafur

Untitled

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