Advertisement
ZeroReinard

bonge

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