nicholasXPG

Untitled

Oct 10th, 2016
231
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 26.74 KB | None | 0 0
  1. ply=game:service'Players'.LocalPlayer
  2. char=ply.Character
  3. torso=char.Torso
  4. rarm,larm=char['Right Arm'],char['Left Arm']
  5. rleg,lleg=char['Right Leg'],char['Left Leg']
  6.  
  7. bcol=BrickColor.new
  8. cfn,md,mr,v3n=CFrame.new,math.rad,math.random,Vector3.new
  9. ang=function(x,y,z)return CFrame.Angles(x or 0,y or 0,z or 0)end
  10. Debris=game:service'Debris'
  11. m={}
  12. m.tau=math.pi*2
  13. m.floatforce = 196.25
  14.  
  15. pcall(function()ply.Backpack.RUDE:Destroy()end)
  16. hop=Instance.new('HopperBin',ply.Backpack)hop.Name='RUDE'
  17.  
  18. local mouse=ply:GetMouse()
  19.  
  20. function genNew(ClassName, Parent, Properties)
  21. local nObj = Instance.new(ClassName, Parent)
  22. if Properties["FormFactor"] then
  23. nObj["FormFactor"] = Properties["FormFactor"]
  24. end
  25. for Prop, Value in pairs(Properties) do
  26. nObj[Prop] = Value
  27. end
  28. return nObj
  29. end
  30. udim=function(a,b,c,d)
  31. if type(a)=='string'then
  32. x,y=tostring(a):match('(%d*%.*%d*),(%d*%.*%d*)')
  33. return UDim2.new(x or 0,x2 or 0,y or 0,y2 or 0)
  34. else
  35. return UDim2.new(a or 0,c or 0,b or 0,d or 0)
  36. end end
  37. rw,rw2,lw,lw2=nil,nil,nil,nil
  38.  
  39. function l(a,x,y,z,xx,yy,zz)
  40. if string.find(tostring(a),',') == nil then
  41. 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)
  42. 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)
  43. end
  44. end
  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. pcall(function() char.Stick:Destroy() end) --- Destroys Physical Tool
  61. Weapon = Instance.new("Model",char) Weapon.Name = 'Stick'
  62.  
  63. Weld = function(p0,p1,x,y,z,rx,ry,rz,par)
  64. p0.Position = p1.Position
  65. local w = Instance.new('Motor',game:service'JointsService')
  66. w.Part0 = p1
  67. w.Part1 = p0
  68. w.C0 = CFrame.new(x or 0,y or 0,z or 0)*CFrame.Angles(rx or 0,ry or 0,rz or 0)
  69. w.MaxVelocity = .1
  70. return w
  71. end
  72. Cur_Parent=nil
  73. current_mat=nil
  74. anchor=false
  75. Part = function(x,y,z,color,tr,cc,an,parent)
  76. local p = Instance.new('Part',parent or Cur_Parent or Weapon)
  77. p.formFactor = 'Custom'
  78. p.Locked = true
  79. p.Size = Vector3.new(x,y,z)
  80. p.BrickColor = BrickColor.new(color or 'White')
  81. p.CanCollide = cc or false
  82. p.Anchored = an or anchor or false
  83. p.Transparency = tr or 0
  84. p.Material=current_mat or'SmoothPlastic'
  85. for i,v in pairs{'TopSurface','BottomSurface','FrontSurface','BackSurface','LeftSurface','RightSurface'}do
  86. p[v]=10
  87. end
  88. return p
  89. end
  90. Wedge = function(x,y,z,color,tr,cc,an,parent)
  91. local p = Instance.new('WedgePart',parent or Weapon)
  92. p.formFactor = 'Custom'
  93. p.Size = Vector3.new(x,y,z)
  94. p.BrickColor = BrickColor.new(color or 'White')
  95. p.CanCollide = cc or false
  96. p.Anchored = an or false
  97. p.Transparency = tr or 0
  98. p.Material=current_mat or'SmoothPlastic'
  99. for i,v in pairs{'TopSurface','BottomSurface','FrontSurface','BackSurface','LeftSurface','RightSurface'}do
  100. p[v]=10
  101. end
  102. return p
  103. end
  104.  
  105. Lightning = function(Start,End,Times,Offset,Color,Thickness,Transparency) --jarredbcv's lightning
  106. local magz = (Start - End).magnitude local curpos = Start local trz = {-Offset,Offset}
  107. for i=1,Times do
  108. local li=Part(Thickness,Thickness,magz/Times,(Color or 'White'),(Transparency or 0))li.Anchored=true
  109. local ofz = Vector3.new(trz[math.random(1,2)],trz[math.random(1,2)],trz[math.random(1,2)])
  110. function touch(hit)
  111. if hit.Parent:findFirstChild("Humanoid") ~= nil and hit.Parent ~= char then
  112. hit.Parent:BreakJoints()
  113. end
  114. end li.Touched:connect(touch)
  115. local trolpos = CFrame.new(curpos,End)*CFrame.new(0,0,magz/Times).p+ofz
  116. if Times == i then
  117. local magz2 = (curpos - End).magnitude li.Size = Vector3.new(Thickness,Thickness,magz2)
  118. li.CFrame = CFrame.new(curpos,End)*CFrame.new(0,0,-magz2/2)
  119. else
  120. li.CFrame = CFrame.new(curpos,trolpos)*CFrame.new(0,0,magz/Times/2)
  121. end
  122. curpos = li.CFrame*CFrame.new(0,0,magz/Times/2).p game.Debris:AddItem(li,0.25)
  123. end
  124. end
  125.  
  126. Lock = function(which) --- For using Animation
  127. if which == 'R' then
  128. if not rw then
  129. rabr = Part(1,1,1,'White',0) rabr.Transparency = 1
  130. rabr.Position = torso.Position
  131. rw = Weld(rabr,torso,1.5,.5,0,0,0,0) rw.Parent = Weapon
  132. local w = Instance.new("Weld",Weapon)
  133. w.Part0,w.Part1 = char['Right Arm'],rabr
  134. w.C1 = CFrame.new(0,-.5,0)
  135. else
  136. rabr:Destroy()rw = nil
  137. end
  138. elseif which == 'L' then
  139. if not lw then
  140. labr = Part(1,1,1,'White',0) labr.Transparency = 1
  141. labr.Position = torso.Position
  142. lw = Weld(labr,torso,-1.5,.5,0,0,0,0) lw.Parent = Weapon
  143. local w = Instance.new("Weld",Weapon)
  144. w.Part0,w.Part1 = char['Left Arm'],labr
  145. w.C1 = CFrame.new(0,-.5,0)
  146. else
  147. labr:Destroy()lw = nil
  148. end
  149. elseif which == 'RR' then
  150. if not rw2 then
  151. rlbr = Part(1,1,1,'White',0) rlbr.Transparency = 1
  152. rlbr.Position = torso.Position
  153. rw2 = Weld(rlbr,torso,.5,-1.5,0,0,0,0) rw2.Parent = Weapon rw2.Name = 'rw2'
  154. local w = Instance.new("Weld",Weapon)
  155. w.Part0,w.Part1 = char['Right Leg'],rlbr
  156. w.C1 = CFrame.new(0,-.5,0)
  157. else
  158. rlbr:Destroy()rw2 = nil
  159. end
  160. elseif which == 'LL' then
  161. if not lw2 then
  162. llbr = Part(1,1,1,'White',0) llbr.Transparency = 1
  163. llbr.Position = torso.Position
  164. lw2 = Weld(llbr,torso,-.5,-1.5,0,0,0,0) lw2.Parent = Weapon lw2.Name = 'lw2'
  165. local w = Instance.new("Weld",Weapon)
  166. w.Part0,w.Part1 = char['Left Leg'],llbr
  167. w.C1 = CFrame.new(0,-.5,0)
  168. else
  169. llbr:Destroy()lw2 = nil
  170. end
  171. end
  172. end
  173.  
  174. Add ={ --- Array for handy functions
  175. BG = function(parent)
  176. local bg = Instance.new("BodyGyro",parent)
  177. bg.P = 20e+003
  178. bg.maxTorque = Vector3.new(4e+005,4e+005,4e+005)*math.huge
  179. return bg
  180. end;
  181. BP = function(parent,position)
  182. local bp = Instance.new("BodyPosition",parent)
  183. bp.maxForce = Vector3.new()*math.huge
  184. bp.position = position or parent.Position
  185. return bp
  186. end;
  187. BV = function(parent,force)
  188. local bv = Instance.new("BodyVelocity",parent)
  189. bv.maxForce = Vector3.new()*math.huge
  190. bv.velocity = force or Vector3.new(0,0,0)
  191. return bv
  192. end;
  193. Sound = function(id,pitch,loop,parent)
  194. local tab = {}
  195. local snd = Instance.new("Sound",parent or char.Head)
  196. snd.Name = 'MugSound'
  197. snd.SoundId = id
  198. snd.Volume = 100
  199. snd.Pitch = pitch or 1
  200. snd.Looped=loop and true or false
  201. tab.Sound = snd
  202. function tab:Play()self.Sound:Play()end
  203. function tab:Stop()self.Sound:Stop()end
  204. function tab:Pitch(a)self.Sound.Pitch = a end
  205. function tab:Volume(a)self.Sound.Volume = a end
  206. setmetatable(tab,{
  207. __call = function(t,param) local cl = t.Sound:Clone() cl.Parent = param return cl end;
  208. })
  209. return tab
  210. end;
  211. Fire = function(parent,size,heat,color,color2)
  212. local f = Instance.new("Fire",parent)
  213. f.Size = size
  214. f.Heat = heat
  215. f.Color = BrickColor.new(color).Color
  216. if color2 then
  217. f.SecondaryColor = BrickColor.new(color2).Color
  218. end
  219. return f
  220. end;
  221. }
  222. tw = function(Weld, Stop, Step,a) --- TweenWeld function
  223. local func = function(w)
  224. local Start = w.C1
  225. local X1, Y1, Z1 = Start:toEulerAnglesXYZ()
  226. local Stop = Stop or cfn()
  227. local X2, Y2, Z2 = Stop:toEulerAnglesXYZ()
  228.  
  229. for i = 0, 1, Step or .1 do
  230. w.C1 = CFrame.new( (Start.p.X * (1 - i)) + (Stop.p.X * i),
  231. (Start.p.Y * (1 - i)) + (Stop.p.Y * i),
  232. (Start.p.Z * (1 - i)) + (Stop.p.Z * i)) * CFrame.fromEulerAnglesXYZ(
  233. (X1 * (1 - i)) + (X2 * i), (Y1 * (1 - i)) + (Y2 * i),
  234. (Z1 * (1 - i)) + (Z2 * i) )
  235. wait()
  236. end
  237.  
  238. w.C1 = Stop
  239. end
  240. if type(Weld)=='table'then
  241. for i=1,#Weld do
  242. if i < #Weld then
  243. coroutine.wrap(function()func(Weld[i])end)()
  244. else
  245. func(Weld[i])
  246. end
  247. end
  248. else
  249. if a then coroutine.wrap(function() func(Weld) end)() else func(Weld) end
  250. end
  251. end
  252. function cTween(obj,en,i2,b)
  253. local lol=(tostring(i2):sub(1)=='-')
  254. en_pos=en
  255. if obj:IsA'JointInstance'then prop='C1'
  256. else prop='CFrame'
  257. end
  258. local st_pos=obj[prop]
  259. local function doit(lol,i2,en)
  260. for i=(lol and 1 or 0),(lol and 0 or 1) ,i2 do
  261. obj[prop]=st_pos:lerp(en_pos,i)
  262. wait()
  263. end
  264. end
  265. if b then Spawn(function()doit(lol,i2,en)end) else doit(lol,i2,en)end
  266. end
  267.  
  268. tv = function(Weld,wut, Stop, Step,a) --- TweenVector function
  269. local func = function(w)
  270. local Start = w[wut]
  271. local X1, Y1, Z1 = Start.x,Start.y,Start.z
  272. local Stop = Stop or v3n()
  273. local X2, Y2, Z2 = Stop.x,Stop.y,Stop.z
  274.  
  275. for i = 0, 1, Step or .1 do
  276. w[wut] = Vector3.new( (Start.x * (1 - i)) + (Stop.x * i),
  277. (Start.y * (1 - i)) + (Stop.y * i),
  278. (Start.z * (1 - i)) + (Stop.z * i))
  279. wait()
  280. end
  281.  
  282. w = Stop
  283. end
  284. if type(Weld)=='table'then
  285. for i=1,#Weld do
  286. if i < #Weld then
  287. coroutine.wrap(function()func(Weld[i])end)()
  288. else
  289. func(Weld[i])
  290. end
  291. end
  292. else
  293. if a then coroutine.wrap(function() func(Weld) end)() else func(Weld) end
  294. end
  295. end
  296.  
  297. Meshes = {Diamond='rbxassetid://9756362';Spikeball='rbxassetid://9982590';Table='rbxassetid://111868131';---MeshIds
  298. Egg='rbxassetid://1527559';Ring='rbxassetid://3270017';Bullet='rbxassetid://2697549';Grass='rbxassetid://1080954';
  299. Shark='rbxassetid://82821384';Sword='rbxassetid://12221720';Crown='rbxassetid://10688643';Spike='rbxassetid://1033714'}
  300. Mesh = function(par,num,x,y,z,tex)
  301. local msh = _
  302. if num == 1 then msh = Instance.new("CylinderMesh",par)
  303. elseif num == 2 then msh = Instance.new("SpecialMesh",par) msh.MeshType = 3
  304. elseif num == 3 then msh = Instance.new("BlockMesh",par)
  305. elseif num == 4 then msh = Instance.new("SpecialMesh",par) msh.MeshType = 'Wedge'
  306. elseif type(num) == 'string' then msh = Instance.new("SpecialMesh",par)
  307. msh.MeshId = string.find(num,'://') == nil and Meshes[num] or num
  308. msh.TextureId = tex and tex or ''
  309. end
  310. msh.Scale = Vector3.new(x or 1,y or 1,z or 1)
  311. return msh
  312. end
  313. function findHum(pos,rad)
  314. local hums={}
  315. function check(a)
  316. local res=false
  317. for i,ho in pairs(hums)do
  318. if a==ho then res=true end
  319. end
  320. return res
  321. end
  322. for i,v in pairs(Workspace:children())do
  323. if v:IsA'Model'and v~=char then
  324. for i,q in pairs(v:children())do
  325. if q:IsA'Humanoid' and q.Parent:FindFirstChild'Torso'and(q.Torso.Position-pos).magnitude < rad then
  326. if not check(q)then
  327. table.insert(hums,q)
  328. end
  329. end
  330. end
  331. end
  332. end
  333. return hums
  334. end
  335.  
  336. torw=char.HumanoidRootPart.RootJoint
  337. ort=cfn(0,0,0,-1,0,0,0,0,1,0,1,-0)
  338.  
  339. hdl=Part(.5,2,.5,'Steel blue')Mesh(hdl,1)
  340. hw=Weld(hdl,rarm,0,-1.1,0,-math.pi/2)
  341.  
  342. pp2=Part(.5,.5,.5,'Steel blue')Mesh(pp2,2)
  343. Weld(pp2,hdl,0,-1)
  344.  
  345. pp2=Part(.51,.1,.51,107)Mesh(pp2,1)pp2.Material='Neon'
  346. Weld(pp2,hdl,0,-.75)
  347.  
  348. p=Part(.7,.1,.7,'Storm blue')Mesh(p,1)
  349. Weld(p,hdl,0,1.05)
  350.  
  351. ball=Part(1,1,1,'107',.1)Mesh(ball,2)ball.Material='Neon'
  352. Weld(ball,hdl,0,1.5,0)
  353.  
  354. p2=Part(.7,.7,.7,'Storm blue')Mesh(p2,2)
  355. Weld(p2,ball,0,-.5)
  356.  
  357. spipart=Part(.1,.1,.1,'',1)
  358. cont={}
  359. spiw=Weld(spipart,ball)
  360. for i=0,m.tau,m.tau/5 do
  361. p=Part(.1,.1,.1,107,1)p.Material='Neon'Mesh(p,'Diamond',.1,.5,.1)
  362. table.insert(cont,p)
  363. ww=Weld(p,spipart,math.cos(i)*.5,-.5,math.sin(i)*.5,math.pi/2,0,math.pi/2+i)ww.C1=ww.C1*ang(md'70')
  364. end
  365. Spawn(function()while wait()do spiw.C0=spiw.C0*ang(0,md'5')end end)
  366. pose={rw={},lw={}}
  367. pose.rw.e=cfn()*ang(md'-90')
  368.  
  369. si=4
  370. numkp=NumberSequenceKeypoint.new
  371. colkp=ColorSequenceKeypoint.new
  372. ar={numkp(0,0,0),numkp(.25,.5,0),numkp(.5,0,0),numkp(.75,.5,0),numkp(1,1,0)}
  373. ar2={numkp(0,.5,0),numkp(.25,si,0),numkp(.5,.5,0),numkp(.75,si/2,0),numkp(1,1,0)}
  374. partem=genNew('ParticleEmitter',ball,{
  375. Transparency=NumberSequence.new(ar);
  376. Size=NumberSequence.new(ar2);
  377. Color=ColorSequence.new(bcol'Cyan'.Color,bcol'New Yeller'.Color);
  378. Lifetime=NumberRange.new(.5,1);
  379. Rate=0;
  380. VelocitySpread=190;
  381. Rotation=NumberRange.new(0,360);
  382. Texture='http://www.roblox.com/asset/?id=246689799';
  383. RotSpeed=NumberRange.new(30);
  384. LightEmission=0;
  385. Speed=NumberRange.new(1,10);
  386. Drag=.5;
  387. Acceleration=Vector3.new(0,10,0);
  388. })
  389.  
  390. function slash(mouse)
  391. tw(rw,cfn()*ang(md'-30'),.2)
  392. partem:Emit(10)partem:Emit(10)
  393. slash_snd:Play()
  394. for i,v in pairs(findHum(ball.Position,10))do
  395. local tag=v:FindFirstChild'Troll'
  396. if not tag then
  397. tag=Instance.new('BoolValue',v)tag.Name='Troll'
  398. Spawn(function()
  399. local p=Part(1,1,1)Weld(p,v.Torso) local msh=Mesh(p,'http://www.roblox.com/asset/?id=37223966',20,20,20)
  400. msh.TextureId='http://www.roblox.com/asset/?id=37223964'
  401. for i,v in pairs(v.Parent:children())do
  402. if v:IsA'BasePart'then v.Transparency=1 end
  403. end
  404. wait(1)
  405. for i,v in pairs(v.Parent:children())do
  406. if v:IsA'BasePart'then v.Transparency=0 end
  407. end p:Destroy()
  408. end)
  409. Debris:AddItem(tag,1)
  410. end
  411. end
  412. tw(rw,pose.rw.e,.2)
  413. end
  414.  
  415. hit_snd=Add.Sound('rbxassetid://10756104',1)
  416. function penta()
  417. tw(rw,cfn(0,.2,0)*ang(md'-90',md'-45'))
  418.  
  419. local p=Part(4,.01,4,'',1)
  420. deca=genNew('Decal',p,{
  421. Texture='rbxassetid://151271428';
  422. Face='Bottom';
  423. })
  424. deca=genNew('Decal',p,{
  425. Texture='rbxassetid://151271428';
  426. Face='Top';
  427. })
  428. p.Anchored=true local i=0 holding=true
  429. while holding do i=i+1
  430. p.CFrame=l(torso,0,0,-2.5,math.pi/2,i*md'20')
  431. local ray=Ray.new(p.Position,(l(p).p-l(p,0,1).p).unit*300)
  432. local obj,pos=Workspace:FindPartOnRay(ray,char)
  433. if obj and pos then hit_snd:Play()
  434. local hum=obj.Parent:FindFirstChild'Humanoid'
  435. local enpos=l(cfn(pos),mr(-2,2),mr(-2,2),mr(-2,2)).p
  436. local pp=Part(.1,.1,.1,'',1)pp.Anchored=true pp.CFrame=cfn(enpos)
  437. local burnsfx=genNew('ParticleEmitter',pp,{
  438. Size=NumberSequence.new({numkp(0,1,0),numkp(1,4,0)});
  439. VelocitySpread=360;
  440. Color=ColorSequence.new(bcol'Cyan'.Color);
  441. Speed=NumberRange.new(60);
  442. Lifetime=NumberRange.new(.05);
  443. Transparency=NumberSequence.new({numkp(0,0,0),numkp(1,1,0)});
  444. })
  445. Debris:AddItem(pp,.5)
  446. --Start,End,Times,Offset,Color,Thickness,Transparency
  447. Lightning(p.Position,enpos,4,3,'Cyan',.2,.5)
  448. if hum then
  449. hum:UnequipTools()
  450. local bp=Add.BP(hum.Torso)
  451. bp.position=hum.Torso.Position
  452. hum.Torso.CFrame=l(hum.Torso.CFrame,0,0,0,mr(-3,3),mr(-3,3),mr(-3,3))
  453. Debris:AddItem(bp,.0001)
  454. end
  455. end
  456. wait()
  457. end
  458.  
  459. p:Destroy()
  460. tw(rw,pose.rw.e)
  461. end
  462.  
  463.  
  464. function RGBtoHSL(col, a)
  465. local r, g, b = col.r / 255, col.g / 255, col.b / 255
  466. local max, min = math.max(r, g, b), math.min(r, g, b)
  467. local h, s, l
  468. l = (max + min) / 2
  469. if max == min then
  470. h, s = 0, 0 -- achromatic
  471. else
  472. local d = max - min
  473. local s
  474. if l > 0.5 then s = d / (2 - max - min) else s = d / (max + min) end
  475. if max == r then
  476. h = (g - b) / d
  477. if g < b then h = h + 6 end
  478. elseif max == g then h = (b - r) / d + 2
  479. elseif max == b then h = (r - g) / d + 4
  480. end
  481. h = h / 6
  482. end
  483. return h, s or 0, l, a or 255
  484. end
  485.  
  486. function HSLtoRGB(hue, sat, light)
  487. local c = light > .5 and (2 - 2 * light) * sat or (2 * light) * sat
  488. local h2 = hue / 60
  489. local x = c * (1 - math.abs((h2 % 2) - 1))
  490. local rgbvals = {{c, x, 0}, {x, c, 0}, {0, c, x}, {0, x, c}, {x, 0, c}, {c, 0, x}}
  491. local rgb = rgbvals[math.floor(h2) + 1]
  492. for i = 1, 3 do rgb[i] = rgb[i] + (light - .5 * c) end
  493. return Color3.new(rgb[1], rgb[2], rgb[3])
  494. end
  495.  
  496. mus=Add.Sound('rbxassetid://151378684',1,true) ---cowardly mont blanc gumi
  497. bpm=111.88
  498. pitch=1
  499. bps=(bpm*pitch)/60
  500. oribps=bps
  501. booms=0
  502. modbps=bps*2
  503. int=0
  504.  
  505. prtic=genNew('ParticleEmitter',char.Torso,{
  506. Texture='rbxassetid://253188763';
  507. Enabled=false;
  508. LockedToPart=true;
  509. Transparency=NumberSequence.new({numkp(0,0),numkp(.25,.5),numkp(.5,.25),numkp(1,1)});
  510. Size=NumberSequence.new({numkp(0,3),numkp(.5,3*.5),numkp(1,3*.75)});
  511. Color=ColorSequence.new(HSLtoRGB(int,1,1),bcol'White'.Color);
  512. VelocitySpread=175;
  513. Lifetime=NumberRange.new(.75);
  514. Speed=NumberRange.new(10);
  515. RotSpeed=NumberRange.new(70,90);
  516. Rotation=NumberRange.new(15,75);
  517. })
  518. prtic2=genNew('ParticleEmitter',char.Torso,{
  519. Texture='http://www.roblox.com/asset/?id=245630713';
  520. Enabled=false;
  521. LockedToPart=true;
  522. Transparency=NumberSequence.new({numkp(0,0),numkp(.25,.5),numkp(.5,.25),numkp(1,1)});
  523. Size=NumberSequence.new({numkp(0,1),numkp(.5,.5),numkp(1,.75)});
  524. Color=ColorSequence.new(HSLtoRGB(int,1,1),bcol'White'.Color);
  525. VelocitySpread=175;
  526. Lifetime=NumberRange.new(.75);
  527. Speed=NumberRange.new(10);
  528. RotSpeed=NumberRange.new(70,90);
  529. Rotation=NumberRange.new(15,75);
  530. })
  531.  
  532. collist={}
  533. for i=80,160,20 do
  534. table.insert(collist,HSLtoRGB(i,1,.75))
  535. end
  536. -- collist={'Bright red','New Yeller','Lime green'}
  537.  
  538. function sit()
  539. Lock'L'Lock'RR'Lock'LL'
  540. local timeElapsed=0
  541. local prevtick=tick()
  542. tw(rw,cfn()*ang(md'30',md'-25'),.1,'')tw(lw,cfn()*ang(md'30',md'25'),.1,'')
  543. tw(rw2,cfn(0,.5,.2)*ang(md'-70',md'25'),.1,'')tw(lw2,cfn(0,.5,.2)*ang(md'-70',md'-25'),.1,'')
  544. cTween(torw,ort*(cfn(0,-2.5,0)*ang(md'25')),.1)
  545. holding=true mus:Play()
  546. local hbeat=game:service'RunService'.Heartbeat
  547. local ownhum
  548. for i,v in pairs(char:children())do if v:IsA'Humanoid'then ownhum=v end end
  549. while holding do
  550. hbeat:wait()
  551. local delta=tick()-prevtick
  552. timeElapsed=timeElapsed+delta
  553. if timeElapsed > 1/bps then
  554. if ownhum then ownhum.Health=ownhum.Health+10 end
  555. for i,v in pairs(findHum(torso.Position,20))do
  556. v.Health=v.Health-5
  557. for i=1,15 do
  558. local pp=Part(1,1,1,'White',1)pp.CFrame=l(v.torso)
  559. local tar=v local bg=Add.BG(v.Torso)bg.cframe=cfn(v.Torso.Position,torso.Position)*ang(math.pi/2)Debris:AddItem(bg,4)
  560. v.Torso.Velocity=cfn(torso.Position,v.Torso.Position).lookVector*50
  561. pp.Touched:connect(function(hit)local hum=hit.Parent:FindFirstChild'Humanoid'
  562. if hum and hum~=tar and hum.Parent~=char then pp:Destroy() hum.Health=hum.Health-5
  563. fir=Add.Fire(hum.Tosro,20,20,'Magenta')
  564. Debris:AddItem(fir,1)end end)
  565. Add.Fire(pp,1,1,'Magenta')
  566. Add.BV(pp,l(v.torso,0,0,0,mr(-1,1),mr(-1,1),mr(-1,1)).lookVector*40)
  567. Debris:AddItem(pp,1)
  568. end
  569. end
  570. if booms%2==0 then
  571.  
  572. int=(int>=#collist and 0 or int)
  573. int=int+1
  574. local hue,sat,li,a=RGBtoHSL(collist[int])
  575. -- print(hue,sat,li,a)
  576. COLOR=ColorSequence.new(collist[int],HSLtoRGB(hue,sat,li*.75))
  577.  
  578. prtic.Color=COLOR prtic:Emit(10)
  579. elseif booms%3==0 then prtic2.Color=COLOR prtic2:Emit(10)end
  580.  
  581. local sfxp=Part(1,1,1,'New Yeller',.75)local msh=Mesh(sfxp,2)
  582. sfxp.Anchored=true sfxp.CFrame=l(torso)
  583. Spawn(function()
  584. for i=.7,1,.025 do
  585. for _,v in pairs(findHum(torso.Position,i*5))do local bp=Add.BP(v.Torso,v.Torso.Position)Debris:AddItem(bp,.5)
  586. v.Health=v.Health-5 end
  587. msh.Scale=Vector3.new(i*10,i*10,i*10)
  588. sfxp.Transparency=i
  589. wait()
  590. end
  591. sfxp:Destroy()
  592. end)
  593. timeElapsed=timeElapsed-1/bps
  594. booms=booms+1
  595. end
  596.  
  597. prevtick=tick()
  598. end
  599. mus:Stop()
  600. tw(rw,pose.rw.e,.1,'')Spawn(function()tw({lw2,lw,rw2},cfn(),.1)end)
  601. cTween(torw,ort,.1)
  602. Lock'L'Lock'LL'Lock'RR'
  603. end
  604.  
  605. konata_snd=Add.Sound('rbxassetid://208421310',1,true)
  606. playing=false
  607. i=0
  608. function konata()
  609. if not playing then
  610. konata_snd:Play()playing=true
  611. -- ball.Material='Plastic'ball.Transparency=0
  612. Spawn(function()
  613. while playing do i=i+25 i=(i>=320 and 0 or i)
  614. ball.Color=HSLtoRGB(i,1,.5)
  615. wait(.1)
  616. end
  617. end)
  618.  
  619. else
  620. konata_snd:Stop()playing=false ball.Material='Neon'ball.Transparency=.1 ball.BrickColor=bcol(107)
  621. end
  622. end
  623.  
  624. hiding=false
  625. curcam=Workspace.CurrentCamera
  626. namn=hop.Name
  627.  
  628. function vortex()
  629. tw(rw,cfn()*ang(md'-175'))
  630. local ball=Part(30,30,30,'Black')ball.Shape=0
  631. ball.Anchored=true
  632. ball.CFrame=l(torso,0,15,-15)
  633. ball.CanCollide=true ball.Anchored=false
  634. Instance.new('BodyForce',ball).force=Vector3.new(0,ball:GetMass()*m.floatforce,0)
  635. Add.Fire(ball,10,10,'New Yeller')
  636. premouse=cfn(torso.Position,mouse.hit.p).lookVector*5
  637. Spawn(function()while ball do --[[ball.CFrame=ball.CFrame:lerp(mouse.hit,.2)]]local mag=(ball.Position-mouse.hit.p).magnitude ball.Velocity=cfn(ball.Position,v3n(mouse.hit.x,torso.Position.y,mouse.hit.z)).lookVector*mag*2 premouse=mouse.hit.p wait()end end)
  638. Debris:AddItem(ball,3)
  639. wait()
  640. tw(rw,pose.rw.e)
  641. end
  642.  
  643. function equip()
  644. Lock'R'
  645. for i=1,.5,-.1 do for q,v in pairs(cont)do v.Transparency=i end wait()end
  646. tw(rw,pose.rw.e)ball.Material='Neon'
  647. end
  648.  
  649. mod1,mod2=Vector3.new(1,4,1),Vector3.new(4,1,4)
  650. slash_snd=Add.Sound('rbxassetid://172264582',.5)
  651.  
  652. function unequip()
  653. for i=.5,1,.1 do for q,v in pairs(cont)do v.Transparency=i end wait()end
  654. ball.Material='SmoothPlastic'
  655. tw(rw,cfn())
  656. Lock'R'
  657. end
  658.  
  659. Keys={}
  660. klist={
  661. onEquip=equip;
  662. onUnequip=unequip;
  663. f=slash;
  664. qq=penta;
  665. xq=sit;
  666. e=vortex;
  667. t=konata;
  668. }
  669.  
  670. function onKey(key)
  671. if Keys[key]then Keys[key]=nil
  672. else Keys[key]=1
  673. end
  674. end
  675. m_down=false
  676. if not Workspace:FindFirstChild'TheGamer101' then
  677. hop.Selected:connect(function(mouse)
  678. klist.onEquip()
  679. mouse.Button1Down:connect(function()m_down=true if attacking or not equipped then return end attacking=true (klist['MouseClick'] or function() return end)() attacking=false end)
  680. mouse.KeyUp:connect(function(key)onKey(key)for i,v in pairs(klist) do if key == i:sub(1,1) and i:sub(2,#i):match('q') then holding = false end end end)
  681. mouse.KeyDown:connect(function(key)onKey(key)
  682. if attacking then return end
  683. for i,v in pairs(klist) do
  684. if key == i:sub(1,1) then
  685. attacking = true
  686. v(mouse)
  687. attacking = false
  688. end
  689. end
  690. end)
  691. mouse.Button1Up:connect(function()m_down=false end)
  692. end)
  693. hop.Deselected:connect(klist.onUnequip)
  694. end
  695. 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 --get rid of remains
Add Comment
Please, Sign In to add comment