TheUnknownDiscord

part?

Sep 2nd, 2021 (edited)
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Tool = Instance.new("Tool")
  2. Tool.Name = "Sword"
  3. Knife = Instance.new("Part")
  4. Knife.Name = "Handle"
  5. Knife.Parent = Tool
  6. Tool.Parent = owner.Character
  7. Knife.Size = Vector3.new(1, 1, 1)
  8. Knife.Massless = true
  9. Knife.CanCollide = true
  10. myhum = owner.Character.Humanoid
  11. local stab = Instance.new("Sound", owner.character.Head)
  12. stab.SoundId = "rbxassetid://199607491"
  13. stab.Volume = 0.5
  14. islunging = false
  15.  
  16. Tool.Activated:connect(function()
  17. islunging = true
  18. stab.PlaybackSpeed = math.random(80, 125)/100
  19. stab:Stop()
  20. stab:Play()
  21. local Anim = Instance.new("StringValue")
  22. Anim.Name = "toolanim"
  23. Anim.Value = "Lunge"
  24. Anim.Parent = Tool
  25. wait(0.25)
  26. islunging = false
  27. wait(0.40)
  28. end)
  29. part = Instance.new("Part",game.Workspace)
  30. part.Anchored = true
  31. part.CFrame = CFrame.new(1000000,1000000,1000000)
  32. function thinghere(plr,action,hit)
  33. if islunging then
  34. part.CFrame = hit
  35. exists = true
  36. end
  37. end
  38.  
  39. local E = Instance.new("RemoteEvent",NLS([[local E = script:FindFirstChildWhichIsA("RemoteEvent")
  40. local Mouse = owner:GetMouse()
  41. function ButtonDown()
  42. if Mouse.Hit ~= nil then
  43. E:FireServer("Down",Mouse.Hit)
  44. end
  45. end
  46. Mouse.Button1Down:Connect(ButtonDown)
  47. ]],owner.PlayerGui))
  48. E.OnServerEvent:Connect(thinghere)
  49.  
  50. local function damagePlayer(otherPart)
  51. local partParent = otherPart.Parent
  52. local humanoid = partParent:FindFirstChildWhichIsA("Humanoid")
  53. if humanoid then
  54. local explosion = Instance.new("Explosion")
  55. explosion.BlastRadius = 20
  56. explosion.Position = part.Position
  57. explosion.Parent = part
  58. wait(0.5) -- Wait for reset time duration
  59. end
  60. end
  61. part.Touched:connect(damagePlayer)
Add Comment
Please, Sign In to add comment