Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- wait(0.2)
- print'axe guitar loaded'
- local player=game.Players.LocalPlayer
- local char=player.Character
- local mesh=Instance.new("SpecialMesh")
- local tool=Instance.new("Tool")
- local handle=Instance.new("Part")
- local tequipped=false
- local hsize=Vector3.new(0.8, 4.54, 0.2)
- local Mouse = player:GetMouse()
- local swinging=false
- local anim=Instance.new("Animation")
- local Humanoid=char.Humanoid
- local dsong=Instance.new("Sound")
- --done declaring stuff, right?--
- handle.Name="Handle"
- tool.Parent=player.Backpack
- tool.Name="Axe Guitar"
- tool.Equipped:connect(function()
- tequipped=true
- end)
- tool.Unequipped:connect(function()
- tequipped=false
- end)
- handle.Parent=tool
- mesh.Parent=handle
- MeshType="FileMesh"
- mesh.Scale=Vector3.new(0.9,0.9,0.9)
- handle.Size=hsize
- mesh.MeshId="http://www.roblox.com/asset/?id=82342591"
- mesh.TextureId="http://www.roblox.com/asset/?id=82342618"
- dsong.SoundId="rbxassetid://219374380"
- dsong.Parent=handle
- anim.AnimationId="rbxassetid://479700414"
- anim.Parent=tool
- function resetpos()
- print'Resetting..'
- tool.GripForward=Vector3.new(0,0,1)
- tool.GripPos=Vector3.new(0,0.5,0)
- tool.GripRight=Vector3.new(1,0,0)
- tool.GripUp=Vector3.new(-0.5,0.9,0)
- end
- Mouse.Button1Down:connect(function()
- print'Ooh! Mouse down!'
- if tequipped==true then
- swinging=true
- tool.GripForward=Vector3.new(0.707,0.707,0)
- tool.GripPos=Vector3.new(0,1.5,0)
- tool.GripRight=Vector3.new(1,0,0)
- tool.GripUp=Vector3.new(0,1,0)
- local animTrack = Humanoid:LoadAnimation(anim)
- animTrack:Play()
- print"played animation"
- local econnection=handle.Touched:connect(function(h)
- if h.Parent:FindFirstChild("Humanoid") then
- h.Parent.Humanoid.Health=0
- dsong:Play()
- wait(5)
- dsong.Volume=0.8
- wait(0.3)
- dsong.Volume=0.6
- wait(0.3)
- dsong.Volume=0.4
- wait(0.3)
- dsong.Volume=0.2
- wait(0.3)
- dsong.Volume=0
- dsong:Stop()
- resetpos()
- end
- end)
- wait(0.8)
- econnection:disconnect()
- swinging=false
- else
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement