lololololololololo

Untitled

Jul 20th, 2016
372
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.78 KB | None | 0 0
  1. --Fire Bending
  2. --Human Parts
  3. local player=game.Players.LocalPlayer
  4. local character=player.Character
  5. local humanoid=character["Humanoid"]
  6. local head=character["Head"]
  7. local torso=character["Torso"]
  8. local arm={left=character["Left Arm"], right=character["Right Arm"]}
  9. local leg={left=character["Left Leg"], right=character["Right Leg"]}
  10.  
  11. --FireBendingHopperBin
  12. local bin=Instance.new("HopperBin")
  13. bin.Parent=player.Backpack
  14. bin.Name="Fire Bending"
  15.  
  16. --Add Instance
  17. local add={
  18. part=function(parent,name,anchored,cancollide,color,shape,t,size,cframe)
  19. local p=Instance.new("Part")
  20. p.Parent=parent
  21. p.Name=name
  22. p.TopSurface="Smooth"
  23. p.BottomSurface="Smooth"
  24. p.formFactor="Custom"
  25. p.Anchored=anchored
  26. p.CanCollide=cancollide
  27. p.BrickColor=BrickColor.new(color)
  28. p.Shape=shape
  29. p.Transparency=t
  30. p.Size=size
  31. p.CFrame=cframe
  32. return p
  33. end,
  34. weld=function(parent,p1,cframe)
  35. local w=Instance.new("Weld")
  36. w.Parent=parent
  37. w.Part0=parent
  38. w.Part1=p1
  39. w.C1=cframe
  40. return w
  41. end,
  42. mesh=function(i,parent,scale)
  43. local m=Instance.new(i)
  44. m.Parent=parent
  45. m.Scale=scale
  46. return m
  47. end,
  48. bg=function(parent,cframe)
  49. local g=Instance.new("BodyGyro")
  50. g.Parent=parent
  51. g.maxTorque=Vector3.new(math.huge,math.huge,math.huge)
  52. g.cframe=cframe
  53. return g
  54. end,
  55. bp=function(parent,pos)
  56. local p=Instance.new("BodyPosition")
  57. p.Parent=parent
  58. p.maxForce=Vector3.new(0,math.huge,0)
  59. p.position=pos
  60. return p
  61. end,
  62. bv=function(parent,velocity)
  63. local v=Instance.new("BodyVelocity")
  64. v.Parent=parent
  65. v.maxForce=Vector3.new(math.huge,math.huge,math.huge)
  66. v.velocity=velocity
  67. return v
  68. end,
  69. bf=function(parent,force)
  70. local f=Instance.new("BodyForce")
  71. f.Parent=parent
  72. f.force=force
  73. return f
  74. end,
  75. bav=function(parent,angular)
  76. local av=Instance.new("BodyAngularVelocity")
  77. av.Parent=parent
  78. av.maxTorque=Vector3.new(math.huge,math.huge,math.huge)
  79. av.angularvelocity=angular
  80. return av
  81. end,
  82. model=function(parent,name)
  83. local m=Instance.new("Model")
  84. m.Parent=parent
  85. m.Name=name
  86. return m
  87. end,
  88. humanoid=function(parent,maxhealth)
  89. local h=Instance.new("Humanoid")
  90. h.Parent=parent
  91. h.MaxHealth=maxhealth
  92. h.Health=maxhealth
  93. return h
  94. end}
  95. local things=add.model(character,"FireBending")
  96. local c=function(f)coroutine.resume(coroutine.create(f))end
  97. local function computePos(pos1,pos2)
  98. local pos3=Vector3.new(pos2.x,pos1.y,pos2.z)
  99. return CFrame.new(pos1,pos3)
  100. end
  101.  
  102. local function getTorso(mouse)
  103. torso.CFrame=computePos(torso.CFrame.p,mouse.Hit.p)
  104. end
  105.  
  106. local touchDeb=false
  107. local function damage(hit)
  108. local humanoid=hit.Parent:FindFirstChild("Humanoid")
  109. local torso=hit.Parent:FindFirstChild("Torso")
  110. if humanoid and torso and humanoid~=character["Humanoid"] and touchDeb==false then
  111. touchDeb=true
  112. local dmg=math.random(5,20)
  113. c(function()
  114. humanoid:TakeDamage(dmg)
  115. torso.Velocity=Vector3.new(math.random(-15,15),math.random(25,40),math.random(-15,15))*2
  116. torso.RotVelocity=Vector3.new(math.random(-25,25),math.random(-25,25),math.random(-25,25))*5
  117. local model=add.model(Workspace,math.floor(dmg))
  118. local h=add.humanoid(model,math.huge)
  119. local dmgpart=add.part(model,"Head",false,false,"Bright red","Block",0,Vector3.new(1,.2,1),hit.CFrame)
  120. local mesh=add.mesh("CylinderMesh",dmgpart,Vector3.new(1,1,1))
  121. local bf=add.bf(dmgpart,Vector3.new(0,dmgpart:GetMass()*200,0))
  122. wait(1)
  123. model:remove()
  124. end)
  125. wait(.1)
  126. touchDeb=false
  127. end
  128. end
  129.  
  130. local trailDeb=false
  131. local function trail(pos)
  132. trailDeb=true
  133. c(function()
  134. old=pos.Position
  135. while trailDeb do
  136. wait()
  137. new=pos.Position
  138. mag=(old-new).magnitude
  139. local trail=add.part(things,"Trail",true,false,"Bright red","Block",0,Vector3.new(3,3,3),CFrame.new(old,new)*CFrame.Angles(0,0,-mag/2))
  140. old=new
  141. trail.Touched:connect(damage)
  142. c(function()
  143. for i=.2,1,.2 do
  144. wait()
  145. trail.Transparency=i
  146. end
  147. trail:remove()
  148. end)
  149. end
  150. end)
  151. end
  152.  
  153. local pathDeb=false
  154. local bpPosition=10
  155. local pathpart=nil
  156. local bp=nil
  157. local function paths()
  158. pathDeb=true
  159. pathpart=add.part(Workspace,"Path",true,false,"Bright red","Block",0,Vector3.new(4,1,4),CFrame.new())
  160. bp=add.bp(torso,Vector3.new(0,bpPosition,0))
  161. while pathDeb==true do
  162. wait()
  163. pathpart.CFrame=torso.CFrame*CFrame.new(0,-4,0)
  164. end
  165. end
  166.  
  167. --FakeArm
  168. local fakeArm={left=add.part(things,"Left Arm",false,false,"White","Block",1,Vector3.new(1,1,1),CFrame.new()),right=add.part(things,"Right Arm",false,false,"White","Block",1,Vector3.new(1,1,1),CFrame.new())}
  169. --local fakeLeg={left=add.part(things,"Left Leg",false,false,"White","Block",1,Vector3.new(1,1,1),CFrame.new()),right=add.part(things,"Right Leg",false,false,"White","Block",1,Vector3.new(1,1,1),CFrame.new())}
  170. local fireHandle={left=add.part(things,"Left Handle",false,false,"White","Block",1,Vector3.new(1,1,1),CFrame.new()),right=add.part(things,"Right Handle",false,false,"White","Block",1,Vector3.new(1,1,1),CFrame.new())}
  171. --Weldz
  172. local connectArm={left=add.weld(torso,fakeArm.left,CFrame.new(-1.5,-.5,0)),right=add.weld(torso,fakeArm.right,CFrame.new(1.5,-.5,0))}
  173. --local connectLeg={left=add.weld(torso,fakeLeg.left,CFrame.new(-.5,1.5,0)),right=add.weld(torso,fakeLeg.right,CFrame.new(.5,1.5,0))}
  174. local armWeld={left=add.weld(fakeArm.left,arm.left,CFrame.new(0,.5,0)),right=add.weld(fakeArm.right,arm.right,CFrame.new(0,.5,0))}
  175. --local legWeld={left=add.weld(fakeLeg.left,arm.left,CFrame.new(0,.5,0)),right=add.weld(fakeLeg.right,arm.right,CFrame.new(0,.5,0))}
  176. local handleWeld={left=add.weld(fireHandle.left,arm.left,CFrame.new(0,-2,0)),right=add.weld(fireHandle.right,arm.right,CFrame.new(0,-2,0))}
  177.  
  178. local anim={
  179. equip=function()
  180. for i=.2,1,.2 do
  181. wait()
  182. armWeld.left.C0=CFrame.Angles(math.rad(135)*i,0,-math.rad(15)*i)
  183. armWeld.right.C0=CFrame.Angles(math.rad(135)*i,0,math.rad(15)*i)
  184. end
  185. end,
  186. firecrush=function(mouse)
  187. getTorso(mouse)
  188. trail(fireHandle.left)
  189. trail(fireHandle.right)
  190. local bv=add.bv(torso,torso.CFrame.lookVector*25)
  191. for i=1,40 do
  192. wait()
  193. armWeld.left.C0=CFrame.Angles(-math.rad(36)*i,0,0)
  194. armWeld.right.C0=CFrame.Angles(-math.rad(36)*i,0,0)
  195. handleWeld.left.C1=CFrame.new(0,-2,0)
  196. handleWeld.right.C1=CFrame.new(0,-2,0)
  197. end
  198. wait(.2)
  199. trailDeb=false
  200. bv:remove()
  201. end,
  202. firebump=function(mouse)
  203. getTorso(mouse)
  204. trail(fireHandle.left)
  205. trail(fireHandle.right)
  206. local bv=add.bv(torso,torso.CFrame.lookVector*50)
  207. fireHandle.left.Touched:connect(damage)
  208. fireHandle.right.Touched:connect(damage)
  209. for i=.2,1,.2 do
  210. wait()
  211. armWeld.left.C0=CFrame.Angles(math.rad(90)*i,0,-math.rad(45)*i)
  212. armWeld.right.C0=CFrame.Angles(math.rad(90)*i,0,math.rad(45)*i)
  213. end
  214. wait(.5)
  215. for i=1,0,-.2 do
  216. wait()
  217. armWeld.left.C0=CFrame.Angles(math.rad(90)*i,0,-math.rad(45)*i)
  218. armWeld.right.C0=CFrame.Angles(math.rad(90)*i,0,math.rad(45)*i)
  219. end
  220. bv:remove()
  221. trailDeb=false
  222. end,
  223. fireshoot=function(mouse)
  224. getTorso(mouse)
  225. trail(fireHandle.left)
  226. trail(fireHandle.right)
  227. local bullet=add.part(Workspace,"FirePistol",false,false,"Bright red","Ball",0,Vector3.new(2,2,2),CFrame.new((torso.CFrame+torso.CFrame.lookVector*10).p,mouse.Hit.p))
  228. bullet.Velocity=bullet.CFrame.lookVector*150
  229. local bf=add.bf(bullet,Vector3.new(0,bullet:GetMass()*196.2,0))
  230. bullet.Touched:connect(damage)
  231. trail(bullet)
  232. for i=.2,1,.2 do
  233. wait()
  234. armWeld.left.C0=CFrame.Angles(math.rad(90)*i,0,math.rad(45)*i)
  235. armWeld.right.C0=CFrame.Angles(math.rad(90)*i,0,-math.rad(45)*i)
  236. handleWeld.left.C1=CFrame.new(0,-2+-2*i,0)
  237. handleWeld.right.C1=CFrame.new(0,-2+-2*i,0)
  238. end
  239. wait(.2)
  240. for i=1,0,-.2 do
  241. wait()
  242. armWeld.left.C0=CFrame.Angles(math.rad(90)*i,0,math.rad(45)*i)
  243. armWeld.right.C0=CFrame.Angles(math.rad(90)*i,0,-math.rad(45)*i)
  244. handleWeld.left.C1=CFrame.new(0,-2+-2*i,0)
  245. handleWeld.right.C1=CFrame.new(0,-2+-2*i,0)
  246. end
  247. game.Debris:AddItem(bullet,5)
  248. trailDeb=false
  249. end,
  250. firerage=function()
  251. trail(fireHandle.left)
  252. trail(fireHandle.right)
  253. torso.Anchored=true
  254. for i=.2,1,.2 do
  255. wait()
  256. armWeld.left.C0=CFrame.Angles(math.rad(90)*i,0,math.rad(45)*i)
  257. armWeld.right.C0=CFrame.Angles(math.rad(90)*i,0,-math.rad(45)*i)
  258. handleWeld.left.C1=CFrame.new(0,-2+-2*i,0)
  259. handleWeld.right.C1=CFrame.new(0,-2+-2*i,0)
  260. end
  261. for i=1,40 do
  262. wait()
  263. local bullet=add.part(Workspace,"FirePistol",false,false,"Bright red","Ball",0,Vector3.new(2,2,2),torso.CFrame*CFrame.Angles(0,math.rad(9)*i,0))
  264. bullet.Velocity=bullet.CFrame.lookVector*150
  265. local bf=add.bf(bullet,Vector3.new(0,bullet:GetMass()*196.2,0))
  266. bullet.Touched:connect(damage)
  267. trail(bullet)
  268. game.Debris:addItem(bullet,5)
  269. end
  270. wait(.2)
  271. for i=1,0,-.2 do
  272. wait()
  273. armWeld.left.C0=CFrame.Angles(math.rad(90)*i,0,math.rad(45)*i)
  274. armWeld.right.C0=CFrame.Angles(math.rad(90)*i,0,-math.rad(45)*i)
  275. handleWeld.left.C1=CFrame.new(0,-2+-2*i,0)
  276. handleWeld.right.C1=CFrame.new(0,-2+-2*i,0)
  277. end
  278. torso.Anchored=false
  279. trailDeb=false
  280. end,
  281. firespin=function()
  282. trail(fireHandle.left)
  283. trail(fireHandle.right)
  284. local bg=add.bg(torso,torso.CFrame)
  285. for i=.2,1,.2 do
  286. wait()
  287. armWeld.left.C0=CFrame.Angles(0,0,math.rad(135)*i)
  288. armWeld.right.C0=CFrame.Angles(0,0,-math.rad(45)*i)
  289. handleWeld.left.C1=CFrame.new(0,-2+-2*i,0)
  290. handleWeld.right.C1=CFrame.new(0,-2+-2*i,0)
  291. end
  292. local bav=add.bav(torso,Vector3.new(0,50,0))
  293. wait(3)
  294. for i=1,0,-.2 do
  295. wait()
  296. armWeld.left.C0=CFrame.Angles(0,0,math.rad(135)*i)
  297. armWeld.right.C0=CFrame.Angles(0,0,-math.rad(45)*i)
  298. handleWeld.left.C1=CFrame.new(0,-2+-2*i,0)
  299. handleWeld.right.C1=CFrame.new(0,-2+-2*i,0)
  300. end
  301. bav:remove()
  302. bg:remove()
  303. trailDeb=false
  304. end,
  305. firewave=function(mouse)
  306. getTorso(mouse)
  307. trail(fireHandle.left)
  308. trail(fireHandle.right)
  309. torso.Anchored=true
  310. for i=.2,1,.2 do
  311. wait()
  312. armWeld.left.C0=CFrame.Angles(math.rad(135)*i,0,math.rad(45)*i)
  313. armWeld.right.C0=CFrame.Angles(math.rad(135)*i,0,-math.rad(45)*i)
  314. handleWeld.left.C1=CFrame.new(0,-2+-2*i,0)
  315. handleWeld.right.C1=CFrame.new(0,-2+-2*i,0)
  316. end
  317. for i=1,15 do
  318. wait()
  319. local firepart=add.part(Workspace,"FireBrick",false,false,"Bright red","Block",0,Vector3.new(5,5,5),torso.CFrame*CFrame.Angles(math.rad(45),0,0)+torso.CFrame.lookVector*4*i)
  320. trail(firepart)
  321. firepart.Touched:connect(damage)
  322. game.Debris:addItem(firepart,.5)
  323. end
  324. wait(.2)
  325. for i=1,0,-.2 do
  326. wait()
  327. armWeld.left.C0=CFrame.Angles(math.rad(135)*i,0,math.rad(45)*i)
  328. armWeld.right.C0=CFrame.Angles(math.rad(135)*i,0,-math.rad(45)*i)
  329. handleWeld.left.C1=CFrame.new(0,-2+-2*i,0)
  330. handleWeld.right.C1=CFrame.new(0,-2+-2*i,0)
  331. end
  332. torso.Anchored=false
  333. trailDeb=false
  334. end
  335. }
  336.  
  337. local keyDeb=false
  338. local keyDeb2=false
  339. bin.Selected:connect(function(mouse)
  340. bin:remove()
  341. anim.equip()
  342. mouse.Button1Down:connect(function()
  343. if keyDeb==false then
  344. keyDeb=true
  345. anim.fireshoot(mouse)
  346. keyDeb=false
  347. end
  348. end)
  349. mouse.KeyDown:connect(function(key)
  350. if key=="q" and keyDeb==false then
  351. keyDeb=true
  352. anim.firecrush(mouse)
  353. keyDeb=false
  354. end
  355. if key=="e" and keyDeb==false then
  356. keyDeb=true
  357. anim.firebump(mouse)
  358. keyDeb=false
  359. end
  360. if key=="r" and keyDeb==false then
  361. keyDeb=true
  362. anim.firespin(mouse)
  363. keyDeb=false
  364. end
  365. if key=="f" and keyDeb==false then
  366. keyDeb=true
  367. anim.firerage()
  368. keyDeb=false
  369. end
  370. if key=="g" and keyDeb==false then
  371. keyDeb=true
  372. anim.firewave(mouse)
  373. keyDeb=false
  374. end
  375. if key=="z" and keyDeb2==false then
  376. keyDeb2=true
  377. paths()
  378. end
  379. if key=="z" and keyDeb2==true then
  380. keyDeb2=false
  381. pathDeb=false
  382. pcall(function() pathpart:remove() bp:remove() end)
  383. end
  384. end)
  385. end) --mediafire
Add Comment
Please, Sign In to add comment