Advertisement
Fatherbeard1

Untitled

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