xx_g

roblox divines

May 12th, 2017
221
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 30.02 KB | None | 0 0
  1. -- divines coded by mugex and TheKorbloxCore, credit pl0x
  2.  
  3. ply=game.Players.LocalPlayer
  4. char=ply.Character
  5. torso=char.Torso
  6. rarm,larm=char['Right Arm'],char['Left Arm']
  7.  
  8. bcol=BrickColor.new
  9. cfn,md,mr=CFrame.new,math.rad,math.random
  10. ang=function(x,y,z)return CFrame.Angles(x or 0,y or 0,z or 0)end
  11. Debris=game:service'Debris'
  12. m={}
  13. m.tau=math.pi*2
  14. m.floatforce = 196.25
  15.  
  16. local mouse=ply:GetMouse()
  17.  
  18. function genNew(ClassName, Parent, Properties)
  19. local nObj = Instance.new(ClassName, Parent)
  20. if Properties["FormFactor"] then
  21. nObj["FormFactor"] = Properties["FormFactor"]
  22. end
  23. for Prop, Value in pairs(Properties) do
  24. nObj[Prop] = Value
  25. end
  26. return nObj
  27. end
  28. udim=function(a,b,c,d)
  29. if type(a)=='string'then
  30. x,y=tostring(a):match('(%d*%.*%d*),(%d*%.*%d*)')
  31. return UDim2.new(x or 0,x2 or 0,y or 0,y2 or 0)
  32. else
  33. return UDim2.new(a or 0,c or 0,b or 0,d or 0)
  34. end end
  35. rw,rw2,lw,lw2=nil,nil,nil,nil
  36.  
  37. function l(a,x,y,z,xx,yy,zz)
  38. if string.find(tostring(a),',') == nil then
  39. return (a.CFrame*CFrame.new(x or 0,y or 0,z or 0))*CFrame.Angles(xx or 0,yy or 0, zz or 0)
  40. else return (a * CFrame.new(x or 0,y or 0,z or 0))*CFrame.Angles(xx or 0,yy or 0,zz or 0)
  41. end
  42. end
  43.  
  44.  
  45.  
  46. local function QuaternionFromCFrame(cf) local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components() local trace = m00 + m11 + m22 if trace > 0 then local s = math.sqrt(1 + trace) local recip = 0.5/s return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5 else local i = 0 if m11 > m00 then i = 1 end if m22 > (i == 0 and m00 or m11) then i = 2 end if i == 0 then local s = math.sqrt(m00-m11-m22+1) local recip = 0.5/s return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip elseif i == 1 then local s = math.sqrt(m11-m22-m00+1) local recip = 0.5/s return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip elseif i == 2 then local s = math.sqrt(m22-m00-m11+1) local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip end end end
  47. local function QuaternionToCFrame(px, py, pz, x, y, z, w) local xs, ys, zs = x + x, y + y, z + z local wx, wy, wz = w*xs, w*ys, w*zs local xx = x*xs local xy = x*ys local xz = x*zs local yy = y*ys local yz = y*zs local zz = z*zs return CFrame.new(px, py, pz,1-(yy+zz), xy - wz, xz + wy,xy + wz, 1-(xx+zz), yz - wx, xz - wy, yz + wx, 1-(xx+yy)) end
  48. local function QuaternionSlerp(a, b, t) local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4] local startInterp, finishInterp; if cosTheta >= 0.0001 then if (1 - cosTheta) > 0.0001 then local theta = math.acos(cosTheta) local invSinTheta = 1/math.sin(theta) startInterp = math.sin((1-t)*theta)*invSinTheta finishInterp = math.sin(t*theta)*invSinTheta else startInterp = 1-t finishInterp = t end else if (1+cosTheta) > 0.0001 then local theta = math.acos(-cosTheta) local invSinTheta = 1/math.sin(theta) startInterp = math.sin((t-1)*theta)*invSinTheta finishInterp = math.sin(t*theta)*invSinTheta else startInterp = t-1 finishInterp = t end end return a[1]*startInterp + b[1]*finishInterp, a[2]*startInterp + b[2]*finishInterp, a[3]*startInterp + b[3]*finishInterp, a[4]*startInterp + b[4]*finishInterp end
  49.  
  50. function clerp(a,b,t)
  51. local qa = {QuaternionFromCFrame(a)}
  52. local qb = {QuaternionFromCFrame(b)}
  53. local ax, ay, az = a.x, a.y, a.z
  54. local bx, by, bz = b.x, b.y, b.z
  55.  
  56. local _t = 1-t
  57. return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t))
  58. end
  59.  
  60.  
  61. pcall(function() char.Sole3:Destroy() end) --- Destroys Physical Tool
  62. pcall(function() ply.PlayerGui.mgui:Destroy()end)
  63. Weapon = Instance.new("Model",char) Weapon.Name = 'Sole3'
  64. Gui = Instance.new('ScreenGui',ply.PlayerGui)Gui.Name='mgui'
  65.  
  66. Weld = function(p0,p1,x,y,z,rx,ry,rz,par)
  67. p0.Position = p1.Position
  68. local w = Instance.new('Motor',par or p0)
  69. w.Part0 = p1
  70. w.Part1 = p0
  71. w.C0 = CFrame.new(x or 0,y or 0,z or 0)*CFrame.Angles(rx or 0,ry or 0,rz or 0)
  72. w.MaxVelocity = .1
  73. return w
  74. end
  75. Cur_Parent=nil
  76. current_mat=nil
  77. anchor=false
  78. Part = function(x,y,z,color,tr,cc,an,parent)
  79. local p = Instance.new('Part',parent or Cur_Parent or Weapon)
  80. p.formFactor = 'Custom'
  81. p.Locked = true
  82. p.Size = Vector3.new(x,y,z)
  83. p.BrickColor = BrickColor.new(color or 'White')
  84. p.CanCollide = cc or false
  85. p.Anchored = an or anchor or false
  86. p.Transparency = tr or 0
  87. p.Material=current_mat or'SmoothPlastic'
  88. for i,v in pairs{'TopSurface','BottomSurface','FrontSurface','BackSurface','LeftSurface','RightSurface'}do
  89. p[v]=10
  90. end
  91. return p
  92. end
  93. function beam(a,b,s,ma)
  94. local mag = ma or (a-b).magnitude
  95. local laz = Part(s or .1,mag,s or .1)
  96. laz.CFrame = (cfn(a,b)*cfn(0,0,-mag/2))*ang(math.pi/2,0,0)
  97. return laz
  98. end
  99. Lock = function(which) --- For using Animation
  100. local result = {rw=false,lw=false}
  101. if which == 'R' then
  102. if not rw then
  103. rabr = Part(1,1,1,'White',0) rabr.Transparency = 1
  104. rabr.Position = torso.Position
  105. rw = Weld(rabr,torso,1.5,.5,0,0,0,0) rw.Parent = Weapon
  106. w = Instance.new("Weld",Weapon)
  107. w.Part0,w.Part1 = char['Right Arm'],rabr
  108. w.C1 = CFrame.new(0,-.5,0)
  109. else
  110. rabr:Destroy()
  111. rw = nil
  112. end
  113. elseif which == 'L' then
  114. if not lw then
  115. labr = Part(1,1,1,'White',0) labr.Transparency = 1
  116. labr.Position = torso.Position
  117. lw = Weld(labr,torso,-1.5,.5,0,0,0,0) lw.Parent = Weapon
  118. w = Instance.new("Weld",Weapon)
  119. w.Part0,w.Part1 = char['Left Arm'],labr
  120. w.C1 = CFrame.new(0,-.5,0)
  121. else
  122. labr:Destroy()
  123. lw = nil
  124. end
  125. elseif which == 'RR' then
  126. if not rw2 then
  127. rlbr = Part(1,1,1,'White',0) rlbr.Transparency = 1
  128. rlbr.Position = torso.Position
  129. rw2 = Weld(rlbr,torso,.5,-1.5,0,0,0,0) rw2.Parent = Weapon rw2.Name = 'rw2'
  130. w = Instance.new("Weld",Weapon)
  131. w.Part0,w.Part1 = char['Right Leg'],rlbr
  132. w.C1 = CFrame.new(0,-.5,0)
  133. else
  134. rlbr:Destroy()
  135. rw2 = _
  136. end
  137. elseif which == 'LL' then
  138. if not lw2 then
  139. llbr = Part(1,1,1,'White',0) llbr.Transparency = 1
  140. llbr.Position = torso.Position
  141. lw2 = Weld(llbr,torso,-.5,-1.5,0,0,0,0) lw2.Parent = Weapon lw2.Name = 'lw2'
  142. w = Instance.new("Weld",Weapon)
  143. w.Part0,w.Part1 = char['Left Leg'],llbr
  144. w.C1 = CFrame.new(0,-.5,0)
  145. else
  146. llbr:Destroy()
  147. lw2 = _
  148. end
  149. elseif which == nil then
  150. if rw then result.rw = true end
  151. if lw then result.lw = true end
  152. if rw2 then result.rw = true end
  153. if lw2 then result.lw = true end
  154. end
  155. return result
  156. end
  157.  
  158. Add ={ --- Array for handy functions
  159. BG = function(parent)
  160. local bg = Instance.new("BodyGyro",parent)
  161. bg.P = 20e+003
  162. bg.maxTorque = Vector3.new(4e+005,4e+005,4e+005)*math.huge
  163. return bg
  164. end;
  165. BP = function(parent,position)
  166. local bp = Instance.new("BodyPosition",parent)
  167. bp.maxForce = Vector3.new()*math.huge
  168. bp.position = position or parent.Position
  169. return bp
  170. end;
  171. BV = function(parent,force)
  172. local bv = Instance.new("BodyVelocity",parent)
  173. bv.maxForce = Vector3.new()*math.huge
  174. bv.velocity = force or Vector3.new(0,0,0)
  175. return bv
  176. end;
  177. Sound = function(id,pitch,loop,parent)
  178. local tab = {}
  179. local snd = Instance.new("Sound",parent or char.Head)
  180. snd.Name = 'MugSound'
  181. snd.SoundId = id
  182. snd.Volume = 100
  183. snd.Pitch = pitch or 1
  184. snd.Looped=loop and true or false
  185. tab.Sound = snd
  186. function tab:Play()self.Sound:Play()end
  187. function tab:Stop()self.Sound:Stop()end
  188. function tab:Pitch(a)self.Sound.Pitch = a end
  189. function tab:Volume(a)self.Sound.Volume = a end
  190. setmetatable(tab,{
  191. __call = function(t,param) local cl = t.Sound:Clone() cl.Parent = param return cl end;
  192. })
  193. return tab
  194. end;
  195. Fire = function(parent,size,heat,color,color2)
  196. local f = Instance.new("Fire",parent)
  197. f.Size = size
  198. f.Heat = heat
  199. f.Color = BrickColor.new(color).Color
  200. if color2 then
  201. f.SecondaryColor = BrickColor.new(color2).Color
  202. end
  203. return f
  204. end;
  205. }
  206. tw = function(Weld, Stop, Step,a) --- TweenWeld function
  207. local func = function(w)
  208. local Start = w.C1
  209. local X1, Y1, Z1 = Start:toEulerAnglesXYZ()
  210. local Stop = Stop
  211. local X2, Y2, Z2 = Stop:toEulerAnglesXYZ()
  212.  
  213. for i = 0, 1, Step or .1 do
  214. w.C1 = CFrame.new( (Start.p.X * (1 - i)) + (Stop.p.X * i),
  215. (Start.p.Y * (1 - i)) + (Stop.p.Y * i),
  216. (Start.p.Z * (1 - i)) + (Stop.p.Z * i)) * CFrame.fromEulerAnglesXYZ(
  217. (X1 * (1 - i)) + (X2 * i), (Y1 * (1 - i)) + (Y2 * i),
  218. (Z1 * (1 - i)) + (Z2 * i) )
  219. wait()
  220. end
  221.  
  222. w.C1 = Stop
  223. end
  224. if type(Weld)=='table'then
  225. for i=1,#Weld do
  226. if i < #Weld then
  227. coroutine.wrap(function()func(Weld[i])end)()
  228. else
  229. func(Weld[i])
  230. end
  231. end
  232. else
  233. if a then coroutine.wrap(function() func(Weld) end)() else func(Weld) end
  234. end
  235. end
  236.  
  237. Meshes = {Diamond='rbxassetid://9756362';Spikeball='rbxassetid://9982590';Table='rbxassetid://111868131';---MeshIds
  238. Egg='rbxassetid://1527559';Ring='rbxassetid://3270017';Bullet='rbxassetid://2697549';Grass='rbxassetid://1080954';
  239. Shark='rbxassetid://82821384';Sword='rbxassetid://12221720';Crown='rbxassetid://10688643';Spike='rbxassetid://1033714'}
  240. Mesh = function(par,num,x,y,z,tex)
  241. local msh = _
  242. if num == 1 then msh = Instance.new("CylinderMesh",par)
  243. elseif num == 2 then msh = Instance.new("SpecialMesh",par) msh.MeshType = 3
  244. elseif num == 3 then msh = Instance.new("BlockMesh",par)
  245. elseif num == 4 then msh = Instance.new("SpecialMesh",par) msh.MeshType = 'Wedge'
  246. elseif type(num) == 'string' then msh = Instance.new("SpecialMesh",par)
  247. msh.MeshId = string.find(num,'://') == _ and Meshes[num] or num
  248. msh.TextureId = tex and tex or ''
  249. end
  250. msh.Scale = Vector3.new(x or 1,y or 1,z or 1)
  251. return msh
  252. end
  253.  
  254. -- hdl=Part(.3,1.5,.3)
  255. -- hw=Weld(hdl,rarm,0,-1,0,-math.pi/2)
  256. -- blade=Part(.25,.5,.75)
  257. -- Weld(blade,hdl,0,1)
  258.  
  259. -- tip1=Part(.3,2,.3)tip2=Part(.3,2,.3)
  260. -- Weld(tip1,blade,0,1.25,.75/2-.15)
  261. -- Weld(tip2,blade,0,1.25,-.75/2+.15)
  262.  
  263. -- tip3=Part(.3,.3,.75)Weld(tip3,hdl,0,.9+2)
  264.  
  265. -- w_parts={hdl,blade,tip1,tip2,tip3}
  266.  
  267. function findHum(pos,rad)
  268. local hums={}
  269. function check(a)
  270. local res=false
  271. for i,ho in pairs(hums)do
  272. if a==ho then res=true end
  273. end
  274. return res
  275. end
  276. for i,v in pairs(Workspace:children())do
  277. if v:IsA'Model'and v~=char then
  278. for i,q in pairs(v:children())do
  279. if q:IsA'Humanoid' and q.Parent:FindFirstChild'Torso'and(q.Torso.Position-pos).magnitude < rad then
  280. if not check(q)then
  281. table.insert(hums,q)
  282. end
  283. end
  284. end
  285. end
  286. end
  287. return hums
  288. end
  289.  
  290.  
  291. smb_sfx=Add.Sound('rbxassetid://184742298',1.75)
  292. loz_sfx=Add.Sound('rbxassetid://131218412',1)
  293. boom_sfx=Add.Sound('rbxassetid://142885319',1)
  294.  
  295.  
  296. attacking=false
  297.  
  298. Keys={}
  299. guys={}
  300.  
  301. function CreateGuy(color,scale)
  302. sX=1
  303. sY=2
  304. sX=scale and sX*scale or sX
  305. sY=scale and sY*scale or sY
  306.  
  307. local _char=Instance.new('Model',Weapon)
  308. Cur_Parent=_char
  309. local _head=Part(sX,sX,sX)
  310. local arm,arm2=Part(sX,sY,sX),Part(sX,sY,sX)
  311. local leg,leg2=Part(sX,sY,sX),Part(sX,sY,sX)
  312. local _torso=Part(sY,sY,sX) _torso.Anchored=true _torso.Position=torso.Position
  313. -- local _bp=Add.BP(_torso,l(torso,0,10).p)
  314. -- local _bg=Add.BG(_torso)
  315.  
  316. local rabr = Part(sX,sX,sX,'White',0) rabr.Transparency = 1
  317. rabr.Position = _torso.Position rabr.Name='q'
  318. local _rw = Weld(rabr,_torso,sY/2+sX/2,sX/2)
  319. w = Instance.new("Weld",Weapon)
  320. w.Part0,w.Part1 = arm,rabr
  321. w.C1 = CFrame.new(0,-sY/4,0)
  322.  
  323. local labr = Part(sX,sX,sX,'White',0) labr.Transparency = 1
  324. labr.Position = _torso.Position labr.Name='q'
  325. local _lw = Weld(labr,_torso,-sY/2-sX/2,sX/2)
  326. w = Instance.new("Weld",Weapon)
  327. w.Part0,w.Part1 = arm2,labr
  328. w.C1 = CFrame.new(0,-sY/4,0)
  329.  
  330. rlbr = Part(sX,sX,sX,'White',0) rlbr.Transparency = 1
  331. rlbr.Position = _torso.Position rlbr.Name='q'
  332. _rw2 = Weld(rlbr,_torso,sX/2,-sY+sX/2,0,0,0,0) _rw2.Parent = Weapon _rw2.Name = 'rw2'
  333. w = Instance.new("Weld",Weapon)
  334. w.Part0,w.Part1 = leg,rlbr
  335. w.C1 = CFrame.new(0,-sY/4,0)
  336.  
  337. llbr = Part(sX,sX,sX,'White',0) llbr.Transparency = 1
  338. llbr.Position = _torso.Position llbr.Name='q'
  339. _lw2 = Weld(llbr,_torso,-sX/2,-sY+sX/2,0,0,0,0) _lw2.Parent = Weapon _lw2.Name = 'lw2'
  340. w = Instance.new("Weld",Weapon)
  341. w.Part0,w.Part1 = leg2,llbr
  342. w.C1 = CFrame.new(0,-sY/4,0)
  343.  
  344. Weld(_head,_torso,0,sY/2+sX/2)
  345. -- _rw=Weld(arm,_torso,-1.5)_lw=Weld(arm2,_torso,1.5)
  346. Cur_Parent=nil
  347. for i,v in pairs(_char:children())do
  348. if v:IsA'Part'then
  349. v.BrickColor=bcol(color or 'White')
  350. -- v.Material='Metal'
  351. v.Reflectance=.1
  352. if v.Name~='q'then
  353. v.Transparency=.05
  354. end
  355. end
  356. end
  357. local sparks=genNew('ParticleEmitter',_torso,{
  358. Rate=10;
  359. Lifetime=NumberRange.new(2,2.5);
  360. Size=NumberSequence.new(.25,1);
  361. Speed=NumberRange.new(1,2);
  362. Rotation=NumberRange.new(0,180);
  363. Acceleration=Vector3.new(0,-20,0);
  364. Transparency=NumberSequence.new(0,.9);
  365. VelocitySpread=45;
  366. RotSpeed=NumberRange.new(40);
  367. Texture='http://www.roblox.com/asset/?id=242218744';
  368. Color=ColorSequence.new(bcol'New Yeller'.Color,bcol'Black'.Color);
  369. })
  370.  
  371. local tab={
  372. char=_char;
  373. head=_head;
  374. rarm=arm;
  375. larm=arm2;
  376. rleg,lleg=leg,leg2;
  377. torso=_torso;
  378. rw=_rw;
  379. rw2=_rw2;
  380. lw=_lw;
  381. lw2=_lw2;
  382. canfollo=true;
  383. -- bp=_bp;
  384. -- bg=_bg;
  385. position=function() return l(torso,-5,10,0) end;
  386. gyro=function()return torso.CFrame-torso.Position end;
  387. }
  388. return tab
  389.  
  390. end
  391.  
  392. function breakdance()
  393. npc.canfollo=false npc2.canfollo=false
  394. tw(npc.rw,cfn()*ang(md'-60',md'45'),.1,'')tw(npc.lw,cfn()*ang(md'-60',md'-45'),.1,'')
  395. tw(npc2.rw,cfn()*ang(md'-60',md'45'),.1,'')tw(npc2.lw,cfn()*ang(md'-60',md'-45'),.1,'')
  396. -- tw(npc.rw2,cfn(0,-.3,0),.1,'')
  397. local prevp=npc.torso.CFrame local prevp2=npc2.torso.CFrame
  398. for i=0,10 do
  399. npc.torso.CFrame=clerp(npc.torso.CFrame,cfn(l(torso,0,0,-10).p,prevp.p)*ang(-math.pi/2,math.pi),.3)
  400. npc2.torso.CFrame=clerp(npc2.torso.CFrame,cfn(l(torso,0,0,-5).p,prevp2.p)*ang(-math.pi/2,math.pi),.3)
  401. wait()
  402. end
  403. -- tw(npc.rw,cfn()*ang(0,0,md'-25'),.3,'')tw(npc.lw,cfn()*ang(0,0,md'25'),.3,'')
  404. tw(npc.rw,cfn(),.3,'')tw(npc.lw,cfn(),.3,'')tw(npc.rw2,cfn()*ang(md'-50'),.3,'')
  405. tw(npc2.rw,cfn(),.3,'')tw(npc2.lw,cfn(),.3,'')tw(npc2.rw2,cfn()*ang(md'-50'),.3,'')
  406. for i=0,10 do
  407. npc.torso.CFrame=clerp(npc.torso.CFrame,cfn(l(torso,-5,10).p,l(torso,0,0,-10).p)*ang(-math.pi/2-md'25'),.1)
  408. npc2.torso.CFrame=clerp(npc2.torso.CFrame,cfn(l(torso,5,10).p,l(torso,0,0,-5).p)*ang(-math.pi/2-md'25'),.1)
  409. wait()
  410. end
  411. tw(npc.rw2,cfn(),.3,'')tw(npc2.rw2,cfn(),.3,'')
  412. npc.canfollo=true npc2.canfollo=true
  413. end
  414.  
  415. guys.One=CreateGuy()
  416. guys.Two=CreateGuy('Black')
  417.  
  418. npc=guys.One
  419. npc2=guys.Two
  420.  
  421. npc2.position=function()return l(torso,5,10) end
  422.  
  423. norm=function(a)
  424. return function()
  425. if a=='p'then return l(torso,-5,10)
  426. elseif a=='p2'then return l(torso,5,10)
  427. elseif a=='g'then return torso.CFrame-torso.Position
  428. end
  429. end
  430.  
  431. end
  432.  
  433. function Polt()
  434. loz_sfx:Play()
  435.  
  436. --Lock'R'Lock'L'
  437. --npc2.gyro=cfn(npc2.torso.Position,mouse.hit.p)
  438. local mcf=mouse.hit
  439. --bg.cframe=cfn(torso.Position,Vector3.new(mcf.x,torso.Position.y,mcf.z))
  440. npc2.position=function()return cfn(l(torso,5,10).p,mouse.hit.p)end
  441. tw(npc2.rw,cfn()*ang(md'-90',md'-45'),.1,'')
  442. tw(npc2.lw,cfn()*ang(md'-90',md'45'))
  443. --bg:Destroy()
  444. --npc2.gyro=norm'g'
  445.  
  446. local bullet=Instance.new('Model',Weapon)local snd_cl=boom_sfx(bullet)
  447. local missile=Part(1,5,1,'Black')
  448. local tip=Part(1.5,1.5,1.5,'Bright red')Weld(tip,missile,0,-2.5)Mesh(tip,2)
  449. local pp=Part(2,.5,.5)Weld(pp,missile,0,2.5+.25)
  450. local pp2=Part(2,.5,.5)Weld(pp2,missile,0,2.5+.25,0,0,md'90')
  451. for i,v in pairs{missile,tip,pp,pp2}do v.Parent=bullet end
  452.  
  453. missile.CFrame=l(cfn(npc2.torso.Position,mouse.hit.p),0,0,-7,math.pi/2)
  454. Add.BV(missile,l(missile,0,0,0,-math.pi/2).lookVector*40)
  455. missile.Touched:connect(function(hit)
  456. if hit.Name=='sss'then return end
  457. snd_cl:Play()
  458. e=genNew('Explosion',Workspace,{
  459. Position=l(missile,0,1).p;
  460. BlastPressure=0;
  461. BlastRadius=1;
  462. DestroyJointRadiusPercent=0;
  463. })
  464. e.Hit:connect(function()local list={} --not too much damage plox
  465. local hum=hit.Parent:FindFirstChild'Humanoid'
  466. if hum and hit.Parent~=char then
  467. for i,v in pairs(list)do if hum==v then print'omg' return end end
  468. hum.Health=hum.Health-15
  469. table.insert(list,hum)
  470. end
  471.  
  472. end)
  473. bullet:Destroy()
  474. end)
  475.  
  476. particle=genNew('ParticleEmitter',missile,{
  477. Texture='rbxassetid://61740850';
  478. Rate=.25;
  479. Acceleration=Vector3.new(0,10,0);
  480. Rotation=NumberRange.new(5,50);
  481. })
  482.  
  483. Spawn(function() --SFX
  484. while missile.Parent ~= nill do
  485. local wave=Part(1,1,1,'New Yeller')wave.Anchored=true wave.Name='sss'
  486. wave.CFrame=l(missile,0,-2.5,0,math.pi/2)
  487. local msh=Mesh(wave,'Ring')
  488. Spawn(function()
  489. for i=0,1,.1 do
  490. msh.Scale=Vector3.new(i*10,i*10,i*5)
  491. wave.Transparency=i
  492. wait()
  493. end
  494. wave:Destroy()
  495. end)
  496. wait(.1)
  497. end
  498. end)
  499.  
  500. tw(npc2.rw,cfn(),.1,'')
  501. tw(npc2.lw,cfn())
  502.  
  503. npc2.position=norm'p2'
  504. Debris:AddItem(bullet,3)
  505. end
  506.  
  507. Spawn(function()
  508. while wait()do
  509. for i,guy in pairs(guys)do
  510. if guy.canfollo then
  511. if type(guy.position)=='function'then
  512. -- guy.bp.position=guy.position()
  513. guy.torso.CFrame=clerp(guy.torso.CFrame,guy.position(),.2)
  514. else
  515. guy.torso.CFrame=clerp(guy.torso.CFrame,guy.position,.2)
  516. end
  517. end
  518. end
  519. end
  520. end)
  521.  
  522. function shoot()
  523. Lock'R'
  524. anchor=true
  525. local li=Instance.new('Model',Weapon)li2=Instance.new('Model',Weapon)
  526. local mag=(mouse.hit.p-torso.Position).magnitude
  527. y=2
  528. if mouse.hit.y > torso.Position.y then y=mouse.hit.y else y=torso.Position.y end
  529.  
  530. mpos=Vector3.new(mouse.hit.x,mouse.hit.y,mouse.hit.z)
  531.  
  532. --local bg=Add.BG(torso)
  533. tw(rw,cfn()*ang(md'180'),.1,'')
  534. tw(npc.rw,cfn(-.15,-.25,0)*ang(o,0,md'-90'),.1,'')
  535. tw(npc.lw,cfn(-.15,-.25,0)*ang(o,0,md'15'),.1,'')
  536. tw(npc.lw2,cfn()*ang(0,0,md'45'),.1,'')
  537. --npc.gyro=cfn(torso.Position,mpos)*ang(0,math.pi/2)
  538. npc.position=function()return (cfn(l(torso,-5,10).p,mouse.hit.p)*ang(0,math.pi/2))end
  539. for i=0,1,.1 do wait()end
  540.  
  541. -- tw(hw,cfn()*ang(md'90',0,md'90'))
  542. local sfxp=Part(1,1,1,'White')local sfmsh=Mesh(sfxp,'Ring')sfxp.Anchored=true
  543. sfxp.CFrame=l(npc.rarm,0,-1,0,math.pi/2)
  544. Spawn(function()
  545. for i=0,1,.1 do
  546. sfxp.Transparency=i
  547. sfmsh.Scale=Vector3.new(i*10,i*10,i*5)
  548. wait()
  549. end sfxp:Destroy() end)
  550.  
  551. wait(.1)
  552. local laz=beam(l(rarm,0,-1).p,l(npc.rarm,0,-1).p)
  553. laz.Parent=li
  554. local lazor=beam(l(npc.rarm,0,-1).p,mpos,.1,(mag<40 and mag or 40))
  555. Mesh(lazor,1)
  556.  
  557. lazor.Parent=li
  558. local ends={l(lazor,0,-lazor.Size.y/2)}
  559.  
  560. local function branch(rad,iter)
  561. len=rad/iter
  562. for i =1,iter do
  563. deg=md(22.5+(22.5/i))
  564. local nlist={}
  565. local cf=cfn(0,-len/2,0)
  566. for _,prev in pairs(ends)do
  567. pos1=l(prev,0,0,0,0,0,deg)*cf
  568. pos2=l(prev,0,0,0,0,0,-deg)*cf
  569.  
  570. p1=beam(l(prev).p,pos1.p)
  571. p2=beam(l(prev).p,pos2.p)
  572.  
  573. pos11=l(prev,0,0,0,deg)*cf
  574. pos12=l(prev,0,0,0,-deg)*cf
  575.  
  576. p11=beam(l(prev).p,pos11.p)
  577. p12=beam(l(prev).p,pos12.p)
  578.  
  579. if i~=iter then --Addition to 1st
  580. pos3=l(prev,0,0,0)*cf
  581. p3=beam(l(prev).p,pos3.p)Mesh(p3,1)
  582. p3.Parent=li
  583. table.insert(nlist,pos3)
  584. end
  585. table.insert(nlist,pos1)table.insert(nlist,pos11)
  586. table.insert(nlist,pos2)table.insert(nlist,pos12)
  587. p1.Parent,p2.Parent,p11.Parent,p12.Parent=li,li,li,li
  588. -- if i==iter then
  589. -- for _,v in pairs{p1,p2,p11,p12}do
  590. -- local p=Part(1,1,1,'White',1)p.CFrame=l(v,0,-v.Size.y/2,0)p.Parent=li2
  591. -- Instance.new('Sparkles',p)
  592. -- end
  593. -- end
  594. for _,v in pairs{p1,p2,p11,p12}do Mesh(v,1)end --Add Meshes
  595. ends=nlist
  596. end
  597. wait()
  598. end
  599. end
  600. local expos=l(lazor,0,-lazor.Size.y/2-10).p
  601. for i,v in pairs(findHum(expos,10))do
  602. v:TakeDamage(5)
  603. v.Jump=true
  604.  
  605. local block=Instance.new('Model',Weapon)
  606. local bl=Part(5,7,5,'Black',.75)bl.Anchored=false bl.Parent=block
  607. bl.CFrame=v.Torso.CFrame
  608. Weld(bl,v.Torso)
  609. Add.BV(bl,cfn(bl.Position,torso.Position).lookVector*20)
  610. Debris:AddItem(block,3)
  611. end
  612. branch(10,3)
  613. anchor=false
  614. -- npc.gyro=norm'g'
  615. npc.position=norm'p'
  616. tw({npc.rw,rw,npc.lw2,npc.lw},cfn(),.1)Lock'R'
  617. for i=0,1,.1 do
  618. for _,v in pairs(li:children())do
  619. v.Transparency=i
  620. end
  621. wait()
  622. end
  623.  
  624. li:Destroy()li2:Destroy()
  625. end
  626.  
  627. function sfx(mouse)
  628. if (mouse.hit.p-torso.Position).magnitude>40 then return end
  629. tw(npc.rw,cfn()*ang(md'-90'),.1,'')
  630. tw(npc.lw2,cfn()*ang(md'75'),.1,'')tw(npc.rw2,cfn()*ang(md'-25'),.1,'')
  631. npc.position=cfn(mouse.hit.p,npc.torso.Position)*ang(0,math.pi)
  632. --npc.gyro=cfn(npc.torso.Position,mouse.hit.p)
  633. while(npc.torso.Position-npc.position.p).magnitude > 3 do wait()end
  634.  
  635. if #findHum(l(npc.rarm,0,-1).p,10)>0 then
  636. for i,v in pairs(findHum(l(npc.rarm,0,-1).p,10))do
  637. v:TakeDamage(5)
  638. v.Sit=true
  639. v.Torso.Velocity=cfn(l(npc.rarm,0,-1).p,v.Torso.Position).lookVector*40+Vector3.new(0,100,0)
  640. end
  641. tw(npc.rw,cfn()*ang(md'-140'),.3)
  642. end
  643.  
  644. --npc.gyro=norm'g'
  645. npc.position=norm'p'
  646. tw({npc.rw,npc.lw2,npc.rw2},cfn())
  647. end
  648. function rotate()
  649. local function dam(hit)
  650. local hum=hit.Parent:FindFirstChild'Humanoid'
  651. if hit.Parent~=char and hum then hum:TakeDamage(5)end
  652. end
  653. local sfp=Part(1,1,1,'White',1)
  654. Weld(sfp,npc2.rarm,0,-1.5,0,math.pi)
  655. sparkles=genNew('ParticleEmitter',sfp,{
  656. Acceleration=Vector3.new(0,20,0);
  657. Texture='http://www.roblox.com/asset/?id=245951454';
  658. })
  659. local sfp2=Part(1,1,1,'White',1)
  660. Weld(sfp2,npc2.larm,0,-1.5,0,math.pi)
  661. sparkles=genNew('ParticleEmitter',sfp2,{
  662. Acceleration=Vector3.new(0,20,0);
  663. Texture='http://www.roblox.com/asset/?id=245951454';
  664. })
  665. sfp.Touched:connect(dam)sfp2.Touched:connect(dam)
  666.  
  667. tw(npc2.rw,cfn()*ang(0,0,md'-90'),.1,'')tw(npc2.lw,cfn()*ang(0,0,md'90'),.1)
  668. npc2.canfollo=false
  669. for i=0,m.tau*3,m.tau/30 do
  670. npc2.torso.CFrame=clerp(npc2.torso.CFrame,l(torso,math.cos(i)*15,0,math.sin(i)*15,0,i),.1)
  671. -- npc2.gyro=cfn()*ang(0,i*4)
  672. wait()
  673. end
  674. npc2.position=norm'p2'
  675. npc2.gyro=norm'g' sfp:Destroy()sfp2:Destroy()
  676. npc2.canfollo=true
  677. tw({npc2.rw,npc2.lw},cfn())
  678. end
  679.  
  680. function cloneattack()
  681. local cnt=0
  682. local clones={}
  683. for i=0,m.tau,m.tau/8 do
  684. cnt=cnt+1
  685. clones['cl'..cnt]=CreateGuy('New Yeller',1.5)
  686. guy=clones['cl'..cnt]
  687. guy.position=function() return cfn(l(torso,math.cos(i)*10,guy.char:GetModelSize().y/2-2,math.sin(i)*10).p,l(torso,0,2).p) end
  688. tw(guy.rw,cfn()*ang(0,0,md'-90'),.1,'')tw(guy.lw,cfn()*ang(0,0,md'90'),.1,'')
  689. end
  690. holding=true
  691. while holding do
  692. for i,guy in pairs(clones)do
  693. if guy.canfollo then
  694. if type(guy.position)=='function'then
  695. -- guy.bp.position=guy.position()
  696. guy.torso.CFrame=clerp(guy.torso.CFrame,guy.position(),.2)
  697. else
  698. guy.torso.CFrame=clerp(guy.torso.CFrame,guy.position,.2)
  699. end
  700. end
  701. end
  702. wait()
  703. end
  704. for i,guy in pairs(clones)do
  705. guy.char:Destroy()
  706. end
  707. clones=nil
  708. end
  709.  
  710.  
  711. curcam=Workspace.CurrentCamera
  712. disap=false
  713.  
  714. box=nil
  715.  
  716.  
  717. ---END PART---
  718. klist={
  719. MouseClick=shoot;
  720. f=Polt;
  721. e=sfx;
  722. r=rotate;
  723. q=breakdance;
  724. tq=cloneattack;
  725. }
  726. function onKey(key)
  727. if Keys[key]then Keys[key]=nil
  728. else Keys[key]=1
  729. end
  730. end
  731. m_down=false
  732. if not Workspace:FindFirstChild'TheGamer101' then
  733. -- Equip()
  734. mouse.Button1Down:connect(function()m_down=true if attacking then return end attacking=true klist['MouseClick']() attacking=false end)
  735. mouse.KeyUp:connect(function(key)onKey(key)for i,v in pairs(klist) do if key == i:sub(1,1) and i:sub(2,2) == 'q' then holding = false end end end)
  736. mouse.KeyDown:connect(function(key)onKey(key)
  737. if attacking then return end
  738. for i,v in pairs(klist) do
  739. if key == i:sub(1,1) then attacking = true v(mouse) attacking = false
  740. end
  741. end
  742. end)
  743. mouse.Button1Up:connect(function()m_down=false end)
  744. -- hop.Deselected:connect(Unequip)
  745. end
  746. for i,v in pairs(torso:children()) do if v:IsA'BodyGyro' or v:IsA'BodyPosition' or v:IsA'BodyVelocity' then v:Destroy() end end
Add Comment
Please, Sign In to add comment