Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- _G.attackspeed = 0.09375
- local rightarm = Instance.new("Weld", owner.Character.Torso)
- rightarm.Part0 = owner.Character.Torso
- rightarm.Part1 = owner.Character["Right Arm"]
- rightarm.C0 = CFrame.new(1.5,0,0)
- rightarm.Name = "RightArmWeld"
- rightarm.Enabled = false
- tool = Instance.new("Tool",owner.Backpack)
- part = Instance.new("Part",tool)
- part.Name = "Handle"
- part.Size = Vector3.new(2.5,2.5,2.5)
- part.Shape = "Ball"
- part.Transparency = 1
- tool.Grip = CFrame.new(0,0,0.65)
- attacking = false
- local tweenService = game:GetService("TweenService")
- local timeToFade = attackspeed
- local object = rightarm
- local tweenInfo = TweenInfo.new(timeToFade,Enum.EasingStyle.Linear)
- local goal = {}
- goal.C0 = CFrame.new(1.75,0.35,-0.65) * CFrame.Angles(math.rad(80),0,0) * CFrame.Angles(0,0,math.rad(15))
- local tween = tweenService:Create(object, tweenInfo, goal)
- tween:Play()
- local goal2 = {}
- goal2.C0 = CFrame.new(1.5,0.65,-0.65) * CFrame.Angles(math.rad(100),0,0) * CFrame.Angles(0,0,math.rad(0))
- local tween2 = tweenService:Create(object, tweenInfo, goal2)
- tween2:Play()
- local goal3 = {}
- goal3.C0 = CFrame.new(1.25,0.35,-0.65) * CFrame.Angles(math.rad(80),0,0) * CFrame.Angles(0,0,math.rad(-15))
- local tween3 = tweenService:Create(object, tweenInfo, goal3)
- tween3:Play()
- local goal4 = {}
- goal4.C0 = CFrame.new(1.5,0.125,-0.45) * CFrame.Angles(math.rad(50),0,0)
- local tween4 = tweenService:Create(object, tweenInfo, goal4)
- tween4:Play()
- local goal5 = {}
- goal5.C0 = CFrame.new(1.5,0,0)
- local tween5 = tweenService:Create(object, tweenInfo, goal5)
- tween5:Play()
- tween.Completed:Connect(function()tween2:Play() end)
- tween2.Completed:Connect(function()tween3:Play() end)
- tween3.Completed:Connect(function()tween4:Play() end)
- tween4.Completed:Connect(function()
- if not attacking then
- tween5:Play()
- else
- tween:Play()
- end
- end)
- tween5.Completed:Connect(function()
- rightarm.Enabled = false
- end)
- tool.Activated:Connect(function()
- attacking = true
- tween:Play()
- rightarm.Enabled = true
- end)
- tool.Deactivated:Connect(function()
- attacking = false
- end)
- local db = false
- part.Touched:Connect(function(hit)
- pcall(function()
- if attacking then
- if hit.Parent ~= owner.Character then
- if hit.Parent:FindFirstChildWhichIsA("Humanoid") then
- if not db then
- db = true
- hit.Parent:FindFirstChildWhichIsA("Humanoid").Health -= 10
- for i,c in pairs(hit.Parent:GetDescendants()) do
- pcall(function()
- if c:IsA("Part") then
- local v = Instance.new("SpawnLocation")
- v.CFrame = c.CFrame
- v.Enabled = false
- if c:FindFirstChildWhichIsA("SpecialMesh") then
- local m = c:FindFirstChildWhichIsA("SpecialMesh"):Clone()
- m.Parent = v
- m.Scale = m.Scale + Vector3.new(0.1,0.1,0.1)
- end
- v.Size = c.Size + Vector3.new(0.1,0.1,0.1)
- v.Transparency = 0.65
- v.Color = Color3.new(1,0,0)
- v.CanCollide = false
- v.Parent = script
- local weld = Instance.new("Weld",c)
- weld.Part0 = v
- weld.Part1 = c
- game:GetService("Debris"):AddItem(v,0.125)
- end
- end)
- end
- wait(attackspeed)
- db = false
- end
- end
- end
- end
- end)
- end)
Add Comment
Please, Sign In to add comment