Advertisement
Blueisim

My Guitar Axe Script (WIP)

Aug 13th, 2016
387
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.90 KB | None | 0 0
  1. wait(0.2)
  2. print'axe guitar loaded'
  3. local player=game.Players.LocalPlayer
  4. local char=player.Character
  5. local mesh=Instance.new("SpecialMesh")
  6. local tool=Instance.new("Tool")
  7. local handle=Instance.new("Part")
  8. local tequipped=false
  9. local hsize=Vector3.new(0.8, 4.54, 0.2)
  10. local Mouse = player:GetMouse()
  11. local swinging=false
  12. local anim=Instance.new("Animation")
  13. local Humanoid=char.Humanoid
  14. local dsong=Instance.new("Sound")
  15. --done declaring stuff, right?--
  16. handle.Name="Handle"
  17. tool.Parent=player.Backpack
  18. tool.Name="Axe Guitar"
  19. tool.Equipped:connect(function()
  20. tequipped=true
  21. end)
  22. tool.Unequipped:connect(function()
  23. tequipped=false
  24. end)
  25. handle.Parent=tool
  26. mesh.Parent=handle
  27. MeshType="FileMesh"
  28. mesh.Scale=Vector3.new(0.9,0.9,0.9)
  29. handle.Size=hsize
  30. mesh.MeshId="http://www.roblox.com/asset/?id=82342591"
  31. mesh.TextureId="http://www.roblox.com/asset/?id=82342618"
  32. dsong.SoundId="rbxassetid://219374380"
  33. dsong.Parent=handle
  34. anim.AnimationId="rbxassetid://479700414"
  35. anim.Parent=tool
  36. function resetpos()
  37. print'Resetting..'
  38. tool.GripForward=Vector3.new(0,0,1)
  39. tool.GripPos=Vector3.new(0,0.5,0)
  40. tool.GripRight=Vector3.new(1,0,0)
  41. tool.GripUp=Vector3.new(-0.5,0.9,0)
  42. end
  43. Mouse.Button1Down:connect(function()
  44. print'Ooh! Mouse down!'
  45. if tequipped==true then
  46. swinging=true
  47. tool.GripForward=Vector3.new(0.707,0.707,0)
  48. tool.GripPos=Vector3.new(0,1.5,0)
  49. tool.GripRight=Vector3.new(1,0,0)
  50. tool.GripUp=Vector3.new(0,1,0)
  51. local animTrack = Humanoid:LoadAnimation(anim)
  52. animTrack:Play()
  53. print"played animation"
  54. local econnection=handle.Touched:connect(function(h)
  55. if h.Parent:FindFirstChild("Humanoid") then
  56. h.Parent.Humanoid.Health=0
  57. dsong:Play()
  58. wait(5)
  59. dsong.Volume=0.8
  60. wait(0.3)
  61. dsong.Volume=0.6
  62. wait(0.3)
  63. dsong.Volume=0.4
  64. wait(0.3)
  65. dsong.Volume=0.2
  66. wait(0.3)
  67. dsong.Volume=0
  68. dsong:Stop()
  69. resetpos()
  70. end
  71. end)
  72. wait(0.8)
  73. econnection:disconnect()
  74. swinging=false
  75. else
  76. end
  77. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement