Advertisement
xtremscriptsxd

particles2

Feb 28th, 2017
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.58 KB | None | 0 0
  1. --game.Players.LocalPlayer.Character.Animate:Destroy()
  2. local Tool=script.Parent
  3. local Player=game.Players.LocalPlayer
  4. local Char=Player.Character
  5. local Hum=Char.Humanoid
  6. local Torso=Char.Torso
  7. local Larm=Char["Left Arm"]
  8. local Rarm=Char["Right Arm"]
  9. local Lleg=Char["Left Leg"]
  10. local Rleg=Char["Right Leg"]
  11. LS=Torso["Left Shoulder"]
  12. LH=Torso["Left Hip"]
  13. RS=Torso["Right Shoulder"]
  14. RH=Torso["Right Hip"]
  15. local Head=Char.Head
  16. Neck=Torso.Neck
  17. local RootPart=Char.HumanoidRootPart
  18. local RootJoint=RootPart.RootJoint
  19. local Mouse=Player:GetMouse()
  20. r=game:service'RunService'.RenderStepped
  21. h=game:service'RunService'.Heartbeat
  22. v3=Vector3.new
  23. cf=CFrame.new
  24. rad = math.rad
  25. ran = math.random
  26. it = Instance.new
  27. c3=Color3.new
  28. angles = CFrame.Angles
  29. necko=cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  30. LHC0=cf(-1,-1,0,-0,-0,-1,0,1,0,1,0,0)
  31. LSC0=cf(-1, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  32. RHC0=cf(1,-1,0,0,0,1,0,1,0,-1,-0,-0)
  33. RSC0=cf(1, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  34. ROOTC0 = cf(0, 0, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  35. LastMove=""
  36. Anim="Idle"
  37. Attacking=false
  38.  
  39.  
  40. clerp = function(a, b, t)
  41.  
  42. return a:lerp(b, t)
  43. end
  44. function defpos()
  45. Neck.C0 = necko
  46. LH.C0 = LHC0
  47. LS.C0 = LSC0
  48. RH.C0 = RHC0
  49. RS.C0 = RSC0
  50. RootJoint.C0 = ROOTC0
  51. end
  52.  
  53.  
  54. function part(parent,anchored,collide,size,cframe,color3,material,trans,meshtype,meshscale)
  55. local partt = it("Part",parent)
  56. partt.Anchored = anchored
  57. partt.CanCollide = collide
  58. partt.Size = size
  59. partt.CFrame = cframe
  60. partt.Color = color3
  61. partt.Material = material
  62. partt.Transparency = trans
  63. if meshtype then
  64. local mesh = it("SpecialMesh", partt)
  65. mesh.MeshType = meshtype
  66. mesh.Scale = meshscale
  67. end
  68. return partt
  69. end
  70.  
  71. function spmesh(parent,id,scale)
  72. local smesh = it("SpecialMesh", parent)
  73. smesh.MeshId = id
  74. smesh.Scale = scale
  75. return smesh
  76. end
  77.  
  78. function decal(parent,texture,face)
  79. local dec = it("Decal", parent)
  80. dec.Texture = texture
  81. dec.Face = face
  82. return dec
  83. end
  84.  
  85. function weld(parent,a,b,c0)
  86. local w=it("Weld",parent)
  87. w.Part0=a
  88. w.Part1=b
  89. w.C0=c0
  90. end
  91.  
  92.  
  93. function PE(part,col3,Lemission,trans,accel,ltp,edirection,enabled,lifetime,rate,rotation,rotspeed,speed,velspread,name,text)
  94. local p=it("ParticleEmitter",part)
  95. p.Texture=text
  96. p.Color=col3
  97. p.LightEmission=Lemission
  98. p.Transparency=trans
  99. p.Acceleration=accel
  100. p.LockedToPart=ltp
  101. p.EmissionDirection=edirection
  102. p.Enabled=enabled
  103. p.Lifetime=lifetime
  104. p.Rate=rate
  105. p.Rotation=rotation
  106. p.RotSpeed=rotspeed
  107. p.Speed=speed
  108. p.VelocitySpread=velspread
  109. p.Name=name
  110. return p
  111. end
  112.  
  113. function PEE(part,size,col3,Lemission,trans,accel,ltp,edirection,enabled,lifetime,rate,rotation,rotspeed,speed,velspread,name,text)
  114. local p=it("ParticleEmitter",part)
  115. p.Size=size
  116. p.Texture=text
  117. p.Color=col3
  118. p.LightEmission=Lemission
  119. p.Transparency=trans
  120. p.Acceleration=accel
  121. p.LockedToPart=ltp
  122. p.EmissionDirection=edirection
  123. p.Enabled=enabled
  124. p.Lifetime=lifetime
  125. p.Rate=rate
  126. p.Rotation=rotation
  127. p.RotSpeed=rotspeed
  128. p.Speed=speed
  129. p.VelocitySpread=velspread
  130. p.Name=name
  131. return p
  132. end
  133.  
  134. local TransTailPoints={}
  135. for i=0,1,.1 do
  136. table.insert(TransTailPoints,NumberSequenceKeypoint.new(i,i,i))
  137. end
  138.  
  139. TailSize={
  140. NumberSequenceKeypoint.new(0,1,0),
  141. NumberSequenceKeypoint.new(.0399,2.12,0),
  142. NumberSequenceKeypoint.new(.129,1.81,0),
  143. NumberSequenceKeypoint.new(.524,1.3,0),
  144. NumberSequenceKeypoint.new(1,.75,0),
  145. }
  146.  
  147. TailPart=part(Char,false,false,v3(0,0,0),cf(0,0,0),c3(0,0,0),"Plastic",0)
  148. TailWeld=weld(Char,Torso,TailPart,cf(0,-.666,.5))
  149. TailEffect=PE(TailPart,ColorSequence.new(Color3.new(1,1,1),Color3.new(0,1,1)),1,NumberSequence.new(TransTailPoints),v3(0,0,0),true,"Back",true,NumberRange.new(1,1,1),499999997952.000,NumberRange.new(0,0,0),NumberRange.new(0,0,0),NumberRange.new(3,3,3),0,"TailEffect","rbxassetid://250815255")
  150.  
  151. local AccelPoints={
  152. Vector3.new(2.5,0,0),
  153. Vector3.new(2,0,0),
  154. Vector3.new(1.5,0,0),
  155. Vector3.new(1,0,0),
  156. Vector3.new(.5,0,0),
  157. Vector3.new(0,0,0),
  158. Vector3.new(-.5,0,0),
  159. Vector3.new(-1,0,0),
  160. Vector3.new(-1.5,0,0),
  161. Vector3.new(-2,0,0),
  162. Vector3.new(-2.5,0,0)
  163. }
  164. spawn(function()
  165. while wait() do
  166. for i=1,11 do
  167. wait(.2)
  168. TailEffect.Acceleration=AccelPoints[i]
  169. end
  170.  
  171. end
  172. end)
  173.  
  174. HPP={
  175. NumberSequenceKeypoint.new(0,1,0),
  176. NumberSequenceKeypoint.new(1,0,0)
  177. }
  178. HeadPart1=part(Char,false,false,v3(0,0,0),cf(0,0,0),c3(0,0,0),"Plastic",1)
  179. HeadPart2=HeadPart1:Clone()
  180. HeadPart2.Parent=Char
  181. HeadPE1=PEE(HeadPart1,NumberSequence.new(HPP),ColorSequence.new(c3(1,1,1),c3(1,1,1)),1,NumberSequence.new(TransTailPoints),v3(0,0,0),true,"Top",true,NumberRange.new(.5,.5,.5),499999997952.000,NumberRange.new(0,0,0),NumberRange.new(0,0,0),NumberRange.new(3,3,3),0,"HeadEffect1","rbxassetid://253188606")
  182. HeadPE2=HeadPE1:Clone()
  183. HeadPE2.Parent=HeadPart2
  184. local HeadWeld1=weld(Char,Head,HeadPart1,cf(.7,0,0))
  185. local HeadWeld2=weld(Char,Head,HeadPart2,cf(-.7,0,0))
  186. touch2=false
  187. touch3=false
  188.  
  189. Mouse.KeyDown:connect(function(Key)
  190. if Key=="q" then
  191. local beentouched=false
  192. local PortalPart=part(Char,true,false,v3(0,0,0),Torso.CFrame*cf(0,10,0),c3(0,0,0),"Plastic",1)
  193. local PortalSizePoints={
  194. NumberSequenceKeypoint.new(0,1,0),
  195. NumberSequenceKeypoint.new(.04,2.9,0),
  196. NumberSequenceKeypoint.new(.127,2.35,0),
  197. NumberSequenceKeypoint.new(.5,1.3,0),
  198. NumberSequenceKeypoint.new(1,.185,0)
  199. }
  200. local PortalEf=PEE(PortalPart,NumberSequence.new(PortalSizePoints),ColorSequence.new(c3(1,1,1),c3(1,1,1)),1,NumberSequence.new(TransTailPoints),v3(0,0,0),true,"Top",true,NumberRange.new(.7,.7,.7),499999997952.000,NumberRange.new(0,0,0),NumberRange.new(0,0,0),NumberRange.new(6,6,6),1000000000.000,"PortalEffect","rbxassetid://253188606")
  201. local hbox=part(Char,false,false,v3(50,50,50),Torso.CFrame*cf(0,10,0),c3(0,0,0),"Plastic",1)
  202. local bp=it("BodyPosition")
  203. bp.maxForce=v3(math.huge,math.huge,math.huge)
  204. bp.Position=PortalPart.Position
  205. bp.Parent=hbox
  206. hbox.Touched:connect(function(hit)
  207. if hit.Parent:FindFirstChild("Humanoid") then
  208. if hit.Parent.Name~=Player.Name then
  209. print("HIT")
  210. if beentouched==false then
  211. beentouched=true
  212. wait(.5)
  213. local Target=part(Char,true,false,v3(0,0,0),hit.Parent.Torso.CFrame,c3(0,0,0),"Plastic",1)
  214. local bullet=part(Char,false,false,v3(0,0,0),PortalPart.CFrame,c3(0,0,0),"Plastic",1)
  215. local bulletPE=PEE(bullet,NumberSequence.new(TailSize),ColorSequence.new(c3(1,1,1),c3(1,1,1)),1,NumberSequence.new(TransTailPoints),v3(0,0,0),false,"Top",true,NumberRange.new(4,4,4),499999997952.000,NumberRange.new(0,0,0),NumberRange.new(0,0,0),NumberRange.new(0,0,0),1000000000.000,"PortalBulletEFFECT","rbxassetid://253188606")
  216. local BV=it("BodyVelocity")
  217. BV.maxForce=Vector3.new(math.huge,math.huge,math.huge)
  218. BV.Velocity=(Target.Position-bullet.Position).unit*50
  219. BV.Parent=bullet
  220.  
  221. bullet.Touched:connect(function(touch)
  222. if touch3==false then
  223. if touch.ClassName=="Part" and touch.Name~=PortalPart.Name then
  224. touch3=true
  225. bulletPE.Enabled=false
  226.  
  227. bullet.Anchored=true
  228. BV:Destroy()
  229. local hbox2=part(Char,false,false,v3(5,5,5),bullet.CFrame,c3(0,0,0),"Plastic",1)
  230. local bp2=it("BodyPosition")
  231. bp2.maxForce=v3(math.huge,math.huge,math.huge)
  232. bp2.Position=bullet.Position
  233. bp2.Parent=hbox2
  234. hbox2.Touched:connect(function(HIT)
  235. if HIT.Parent:FindFirstChild("Humanoid") then
  236. if HIT.Parent.Name~=Player.Name then
  237. local HUUM=HIT.Parent:FindFirstChild("Humanoid")
  238. HUUM.Health=HUUM.Health-30
  239. hbox2:Destroy()
  240. end
  241. end
  242. end)
  243. local ballp=part(Char,true,false,v3(0,0,0),bullet.CFrame,c3(0,1,1),"Plastic",0)
  244. ballp.TopSurface=0
  245. ballp.BottomSurface=0
  246. local ball=it("SpecialMesh",ballp)
  247. ball.MeshType="Sphere"
  248. ball.Scale=v3(10,10,10)
  249. local bpart1=part(Char,true,false,v3(0,0,0),bullet.CFrame*angles(ran(-10,10),ran(-10,10),ran(-10,10)),c3(0,1,1),"Plastic",0)
  250. bpart1.TopSurface=Enum.SurfaceType.SmoothNoOutlines
  251. bpart1.BottomSurface=Enum.SurfaceType.SmoothNoOutlines
  252. local bpart2=bpart1:Clone()
  253. bpart2.Parent=Char
  254. bpart2.CFrame=bpart2.CFrame*angles(ran(-10,10),ran(-10,10),ran(-10,10))
  255. local bm1=it("BlockMesh",bpart1)
  256. bm1.Scale=v3(10,10,10)
  257. local bm2=bm1:Clone()
  258. bm2.Parent=bpart2
  259. bulletPE:Destroy()
  260. local expPE=PEE(bullet,NumberSequence.new(PortalSizePoints),ColorSequence.new(c3(0,1,1),c3(0,1,1)),1,NumberSequence.new(TransTailPoints),v3(0,0,0),true,"Top",true,NumberRange.new(.7,.7,.7),499999997952.000,NumberRange.new(0,0,0),NumberRange.new(0,0,0),NumberRange.new(30,30,30),1000000000.000,"PortalEffect","rbxassetid://298035054")
  261. for i=1,50 do
  262. h:wait()
  263. ball.Scale=ball.Scale+v3(2,2,2)
  264. bm1.Scale=bm1.Scale+v3(1,1,1)
  265. bm2.Scale=bm2.Scale+v3(1,1,1)
  266. ballp.Transparency=i/50
  267. bpart1.Transparency=i/50
  268. bpart2.Transparency=i/50
  269. bpart2.CFrame=bpart2.CFrame*angles(ran(-10,10),ran(-10,10),ran(-10,10))
  270. bpart1.CFrame=bpart1.CFrame*angles(ran(-10,10),ran(-10,10),ran(-10,10))
  271. end
  272. expPE.Enabled=false
  273. end
  274.  
  275.  
  276. end
  277. end)
  278. wait(3)
  279. BV:Destroy()
  280. Target:Destroy()
  281. bullet:Destroy()
  282. beentouched=false
  283. touch3=false
  284. end
  285. end
  286. end
  287.  
  288. end)
  289.  
  290.  
  291. wait(10)
  292. bp:Destroy()
  293. PortalEf:Destroy()
  294. hbox:Destroy()
  295. PortalPart:Destroy()
  296. beentouched=false
  297. end
  298. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement