Advertisement
Rufus14

Bloody Battle: Bone

Dec 10th, 2019
6,871
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 10.45 KB | None | 0 0
  1. --By Rufus14
  2. --Converted with ttyyuu12345's model to script plugin v4
  3. Tool0 = Instance.new("Tool")
  4. Part2 = Instance.new("Part")
  5. Sound3 = Instance.new("Sound")
  6. Sound4 = Instance.new("Sound")
  7. SpecialMesh5 = Instance.new("SpecialMesh")
  8. Sound6 = Instance.new("Sound")
  9. Sound7 = Instance.new("Sound")
  10. Tool0.Name = "Bone"
  11. Tool0.Grip = CFrame.new(0, 0, -1, 0, 0, 1, 1, 0, 0, 0, 1, 0)
  12. Tool0.GripForward = Vector3.new(-1, -0, -0)
  13. Tool0.GripPos = Vector3.new(0, 0, -1)
  14. Tool0.GripRight = Vector3.new(0, 1, 0)
  15. Tool0.GripUp = Vector3.new(0, 0, 1)
  16. Tool0.ToolTip = "see: Bloody Battle"
  17. Part2.Name = "Handle"
  18. Part2.Parent = Tool0
  19. Part2.CFrame = CFrame.new(-4.13499451, 2.47999811, -8.17498779, 0, 1, -1.67022213e-15, -5.83196259e-21, 1.67022213e-15, 1, 1, 9.74067324e-36, 5.83196259e-21)
  20. Part2.Orientation = Vector3.new(-90, -90, 0)
  21. Part2.Position = Vector3.new(-4.13499451, 2.47999811, -8.17498779)
  22. Part2.Rotation = Vector3.new(-90, 0, -90)
  23. Part2.Color = Color3.new(0.929412, 0.917647, 0.917647)
  24. Part2.Size = Vector3.new(0.350000024, 0.529999852, 4.35999823)
  25. Part2.BottomSurface = Enum.SurfaceType.Smooth
  26. Part2.BrickColor = BrickColor.new("Lily white")
  27. Part2.TopSurface = Enum.SurfaceType.Smooth
  28. Part2.brickColor = BrickColor.new("Lily white")
  29. Part2.FormFactor = Enum.FormFactor.Plate
  30. Part2.formFactor = Enum.FormFactor.Plate
  31. Sound3.Name = "dodge"
  32. Sound3.Parent = Part2
  33. Sound3.SoundId = "rbxassetid://357417055"
  34. Sound3.Volume = 2.5
  35. Sound4.Name = "damage"
  36. Sound4.Parent = Part2
  37. Sound4.SoundId = "rbxassetid://410625063"
  38. Sound4.Volume = 2.5
  39. SpecialMesh5.Parent = Part2
  40. SpecialMesh5.MeshId = "rbxassetid://523610338"
  41. SpecialMesh5.Scale = Vector3.new(0.0250000004, 0.0250000004, 0.0250000004)
  42. SpecialMesh5.MeshType = Enum.MeshType.FileMesh
  43. Sound6.Name = "shoot"
  44. Sound6.Parent = Part2
  45. Sound6.SoundId = "rbxassetid://340722848"
  46. Sound6.Volume = 2
  47. Sound7.Name = "pullout"
  48. Sound7.Parent = Part2
  49. Sound7.SoundId = "rbxassetid://422747271"
  50. Sound7.Volume = 2
  51. Tool0.Parent = owner.Character
  52. coroutine.wrap(function()
  53. --By Rufus14
  54. tool = Tool0
  55. handle = tool.Handle
  56. dodgesound = handle.dodge
  57. hitsound = handle.damage
  58. pulloutsound = handle.pullout
  59. shootsound = handle.shoot
  60. owner = nil
  61. character = nil
  62. runservice = game:GetService("RunService")
  63. cananimate = true
  64. equipped = true
  65. canattack = true
  66. candodgeanim = true
  67. mousepress = false
  68. autobreak = false
  69. dodges = 0
  70. farmedhp = 0
  71. handle.Touched:connect(function(part)
  72.     local hum = part.Parent:findFirstChildOfClass("Humanoid")
  73.     if hum and tool.Parent ~= workspace then
  74.         hitsound:Play()
  75.         hum.Health = hum.Health - 1
  76.         farmedhp = farmedhp + 1
  77.         if farmedhp == 60 then
  78.             farmedhp = 0
  79.             dodges = dodges + 1
  80.             print("new dodge "..tostring(dodges))
  81.         end
  82.     end
  83. end)
  84. tool.Deactivated:connect(function()
  85.     mousepress = false
  86. end)
  87. tool.Activated:connect(function()
  88.     mousepress = true
  89.     if canattack then
  90.         cananimate = false
  91.         canattack = false
  92.         local rightarmweld = character.Torso:findFirstChild("RightArmWeldbone")
  93.         local rootweld = character.HumanoidRootPart:findFirstChild("HumanoidRootPartWeldbone")
  94.         for i = 0,1 , 0.07 do
  95.             rootweld.C0 = rootweld.C0:lerp(CFrame.fromEulerAnglesXYZ(0,math.rad(10),0),i)
  96.             rightarmweld.C0 = rightarmweld.C0:lerp(CFrame.new(1.5,0.5,0) * CFrame.fromEulerAnglesXYZ(math.rad(30),math.rad(50),math.rad(-20)) * CFrame.new(0,-0.5,0),i)
  97.             runservice.Stepped:wait()
  98.         end
  99.         for i = 0,1 , 0.1 do
  100.             rootweld.C0 = rootweld.C0:lerp(CFrame.fromEulerAnglesXYZ(0,math.rad(-20),0),i)
  101.             rightarmweld.C0 = rightarmweld.C0:lerp(CFrame.new(1.5,0.5,0) * CFrame.fromEulerAnglesXYZ(math.pi-math.rad(30),math.rad(-30),math.rad(30)) * CFrame.new(0,-0.5,0),i)
  102.             runservice.Stepped:wait()
  103.         end
  104.         canattack = true
  105.         cananimate = true
  106.         if mousepress then
  107.             local gasterblaster = Instance.new("Part", character.Head)
  108.             gasterblaster.Size = Vector3.new(16, 0, 20)
  109.             gasterblaster.Transparency = 1
  110.             gasterblaster.CanCollide = false
  111.             gasterblaster.Anchored = true
  112.             local gasterdecal = Instance.new("Decal", gasterblaster)
  113.             gasterdecal.Texture = "http://www.roblox.com/asset/?id=323497117"
  114.             gasterdecal.Face = "Top"
  115.             local gasterdecal1 = Instance.new("Decal", gasterblaster)
  116.             gasterdecal1.Texture = "http://www.roblox.com/asset/?id=323497117"
  117.             gasterdecal1.Face = "Bottom"
  118.             gasterblaster.CFrame = character.Head.CFrame
  119.             pulloutsound.TimePosition = 0.2
  120.             pulloutsound:Play()
  121.             coroutine.wrap(function()
  122.                 local torsopos = character.HumanoidRootPart.CFrame
  123.                 for i = 0,0.5 , 0.01 do
  124.                     gasterblaster.CFrame = gasterblaster.CFrame:lerp(torsopos * CFrame.new(0,6.5,7) * CFrame.fromEulerAnglesXYZ(math.rad(-15),0,0),i)
  125.                     runservice.Stepped:wait()
  126.                 end
  127.                 shootsound:Play()
  128.                 local beam = Instance.new("Part", gasterblaster)
  129.                 beam.Material = "Neon"
  130.                 beam.Anchored = true
  131.                 beam.Shape = "Cylinder"
  132.                 beam.Size = Vector3.new(100,6,6)
  133.                 beam.CanCollide = false
  134.                 beam.CFrame = gasterblaster.CFrame * CFrame.new(0,0,-54)
  135.                 beam.CFrame = beam.CFrame * CFrame.fromEulerAnglesXYZ(0,math.pi/2,0)
  136.                 beam.Touched:connect(function(part)
  137.                     local hum = part.Parent:findFirstChildOfClass("Humanoid")
  138.                     if hum and part.Parent ~= character then
  139.                         hitsound:Play()
  140.                         hum.Health = hum.Health - 1
  141.                         farmedhp = farmedhp + 1
  142.                         if farmedhp == 60 then
  143.                             farmedhp = 0
  144.                             dodges = dodges + 1
  145.                             print("new dodge "..tostring(dodges))
  146.                         end
  147.                     end
  148.                 end)
  149.                 local sin = 0
  150.                 for i = 1,100 do
  151.                     sin = sin + 1
  152.                     beam.Size = Vector3.new(100,6+math.sin(sin/2)/1.5,6+math.sin(sin/2)/1.5)
  153.                     beam.Transparency = beam.Transparency + 0.01
  154.                     gasterdecal.Transparency = gasterdecal.Transparency +  0.01
  155.                     gasterdecal1.Transparency = gasterdecal1.Transparency + 0.01
  156.                     gasterblaster.CFrame = gasterblaster.CFrame * CFrame.fromEulerAnglesXYZ(0,0,0.3)
  157.                     runservice.Stepped:wait()
  158.                 end
  159.                 gasterblaster:destroy()
  160.             end)()
  161.         end
  162.     end
  163. end)
  164. tool.Equipped:connect(function()
  165.     equipped = true
  166.     owner = game:GetService("Players"):GetPlayerFromCharacter(tool.Parent)
  167.     character = owner.Character
  168.     cananimate = true
  169.     local rootpart = character.HumanoidRootPart
  170.     local humanoid = character:findFirstChildOfClass("Humanoid")
  171.     local rightarm = Instance.new("Weld", owner.Character.Torso)
  172.     rightarm.Part0 = owner.Character.Torso
  173.     rightarm.Part1 = owner.Character["Right Arm"]
  174.     rightarm.C0 = CFrame.new(1.5,0,0)
  175.     rightarm.Name = "RightArmWeldbone"
  176.     local humanoidrootpart = Instance.new("Weld", rootpart)
  177.     humanoidrootpart.Part0 = rootpart
  178.     humanoidrootpart.Part1 = owner.Character.Torso
  179.     humanoidrootpart.Name = "HumanoidRootPartWeldbone"
  180.     local humhp = humanoid.Health
  181.     coroutine.wrap(function()
  182.         while equipped and runservice.Stepped:wait() do --[[print("equipped")--]] end
  183.         while not equipped and runservice.Stepped:wait() do --[[print("not equipped, waiting for another equip")--]] end
  184.         --print("equipped, autobreak is true")
  185.         autobreak = true
  186.     end)()
  187.     coroutine.wrap(function()
  188.         local savedchar = character
  189.         while runservice.Stepped:wait() and savedchar == character do
  190.             if autobreak then
  191.                 autobreak = false
  192.                 --print("broke, autobreak is false")
  193.                 break
  194.             end
  195.             if humanoid.Health < humhp then
  196.                 if dodges > 0 then
  197.                     dodges = dodges - 1
  198.                     humanoid.Health = humhp
  199.                     dodgesound:Play()
  200.                     if candodgeanim then
  201.                         candodgeanim = false
  202.                         local rightarmm = Instance.new("Weld", owner.Character.Torso)
  203.                         rightarmm.Part0 = owner.Character.Torso
  204.                         rightarmm.Part1 = owner.Character["Right Arm"]
  205.                         rightarmm.C0 = CFrame.new(1.5,0,0)
  206.                         rightarmm.Name = "RightArmWeldbonedodge"
  207.                         local leftarmm = Instance.new("Weld", owner.Character.Torso)
  208.                         leftarmm.Part0 = owner.Character.Torso
  209.                         leftarmm.Part1 = owner.Character["Left Arm"]
  210.                         leftarmm.C0 = CFrame.new(-1.5,0,0)
  211.                         leftarmm.Name = "LeftArmWeldbonedodge"
  212.                         local headd = Instance.new("Weld", owner.Character.Torso)
  213.                         headd.Part0 = owner.Character.Torso
  214.                         headd.Part1 = owner.Character.Head
  215.                         headd.C0 = CFrame.new(0,1.5,0)
  216.                         headd.Name = "HeadWeldbonedodge"
  217.                         local humanoidrootpartt = Instance.new("Weld", rootpart)
  218.                         humanoidrootpartt.Part0 = rootpart
  219.                         humanoidrootpartt.Part1 = owner.Character.Torso
  220.                         humanoidrootpartt.Name = "HumanoidRootPartWeldbonedodge"
  221.                         coroutine.wrap(function()
  222.                             wait()
  223.                             humanoid.PlatformStand = false
  224.                         end)()
  225.                         coroutine.wrap(function()
  226.                             local sine = 0
  227.                             if math.random(1,2) == 1 then
  228.                                 for i = 1,30 do
  229.                                     sine = sine + 1
  230.                                     humanoidrootpartt.C0 = humanoidrootpartt.C0:lerp(CFrame.new(math.cos(sine/17)*3.5,0,0) * CFrame.fromEulerAnglesXYZ(0,math.cos(sine/17),0), 0.2)
  231.                                     runservice.Stepped:wait()
  232.                                 end
  233.                             else
  234.                                 for i = 1,30 do
  235.                                     sine = sine + 1
  236.                                     humanoidrootpartt.C0 = humanoidrootpartt.C0:lerp(CFrame.new(-math.cos(sine/17)*3.5,0,0) * CFrame.fromEulerAnglesXYZ(0,-math.cos(sine/17),0), 0.2)
  237.                                     runservice.Stepped:wait()
  238.                                 end
  239.                             end
  240.                             rightarmm:destroy()
  241.                             leftarmm:destroy()
  242.                             headd:destroy()
  243.                             humanoidrootpartt:destroy()
  244.                             candodgeanim = true
  245.                         end)()
  246.                         coroutine.wrap(function()
  247.                             for i = 0,1 , 0.05 do
  248.                                 headd.C0 = headd.C0:lerp(CFrame.new(0,1,0) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(20)) * CFrame.new(0,0.5,0),i)
  249.                                 rightarmm.C0 = rightarmm.C0:lerp(CFrame.new(1.5,0.5,0) * CFrame.fromEulerAnglesXYZ(math.pi,0,math.rad(30)) * CFrame.new(0,-0.5,0),i)
  250.                                 leftarmm.C0 = leftarmm.C0:lerp(CFrame.new(-1.5,0.5,0) * CFrame.fromEulerAnglesXYZ(math.pi,0,math.rad(-30)) * CFrame.new(0,-0.5,0),i)
  251.                                 runservice.Stepped:wait()
  252.                             end
  253.                         end)()
  254.                     end
  255.                 end
  256.             end
  257.             humhp = humanoid.Health
  258.         end
  259.         --print("lost bone/equipped again")
  260.     end)()
  261.     coroutine.wrap(function()
  262.         while runservice.Stepped:wait() and equipped do
  263.             if cananimate then
  264.                 humanoidrootpart.C0 = humanoidrootpart.C0:lerp(CFrame.new(),0.1)
  265.                 rightarm.C0 = rightarm.C0:lerp(CFrame.new(1.5,0,0.2) * CFrame.fromEulerAnglesXYZ(0,math.rad(-30),0),0.1)
  266.             end
  267.         end
  268.     end)()
  269. end)
  270. tool.Unequipped:connect(function()
  271.     equipped = false
  272.     if character.Torso:findFirstChild("RightArmWeldbone") then
  273.         character.Torso:findFirstChild("RightArmWeldbone"):destroy()
  274.     end
  275.     if character:findFirstChild("HumanoidRootPart") then
  276.         if character.HumanoidRootPart:findFirstChild("HumanoidRootPartWeldbone") then
  277.             character.HumanoidRootPart:findFirstChild("HumanoidRootPartWeldbone"):destroy()
  278.         end
  279.     end
  280. end)
  281.  
  282. end)()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement