Advertisement
gangmanstyler2

Untitled

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