Advertisement
Dark_EccentricYT

Untitled

Aug 12th, 2017
5,675
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 36.20 KB | None | 0 0
  1. --updated knight yo~
  2.  
  3. --sorry ppatta ):
  4.  
  5.  
  6. Services = setmetatable({},{__index=function(s,r) return game:service(r) end})
  7. Player = Services.Players.LocalPlayer
  8. wait()script.Parent=nil
  9. BodyParts={}
  10. abs = function(int)
  11. if int < 0 then return -int else return int end
  12. end
  13. rad = function(deg)
  14. return deg * math.pi / 180
  15. end
  16. deg = function(rad)
  17. return rad * 180 / math.pi
  18. end
  19. dist = function(p1,p2)
  20. r,e = ypcall(function()
  21. p1 = p1.Position
  22. end)
  23. if not r then p1 = p1 end
  24. r,e = ypcall(function()
  25. p2 = p2.Position
  26. end)
  27. if not r then p1 = p1 end
  28. return math.sqrt( (p2.X-p1.X)^2 + (p2.Y-p1.Y)^2 + (p2.Z-p1.Z)^2 )
  29. end
  30.  
  31. function GetChar()
  32. return Player.Character
  33. end
  34. function GetHum()
  35. for i,v in pairs(GetChar():children'') do
  36. if v.ClassName == 'Humanoid' then
  37. return v
  38. end
  39. end
  40. end
  41.  
  42. function Died()
  43. for i,v in pairs(GetChar():children'') do
  44. if v.ClassName == 'Part' then
  45. table.insert(BodyParts,{v.CFrame,v})
  46. elseif v.ClassName == 'Hat' then
  47. v.Parent=workspace
  48. table.insert(BodyParts,{v.Handle.CFrame,v.Handle,1})
  49. end
  50. end
  51.  
  52. wait(3)
  53. for i,v in pairs(BodyParts) do
  54. v[2].Anchored=true
  55. if v[2].Name == 'Torso' then pos = v[1] end
  56. end
  57.  
  58. for i,v in pairs(BodyParts) do
  59. coroutine.resume(coroutine.create(function()
  60. repeat Services.RunService.Heartbeat:wait()
  61. v[2].CFrame = v[2].CFrame:lerp(v[1],.1)
  62. until dist(v[2],v[1]) < .05
  63. v[2].CFrame=v[1]
  64. end))
  65. end
  66. end
  67.  
  68. Player.CharacterAdded:connect(function(char)
  69. char:WaitForChild('Torso')
  70. for i,v in pairs(BodyParts) do
  71. if v[3] then
  72. v[2]:Remove()
  73. end
  74. end
  75. BodyParts={}
  76. char.Torso.CFrame=pos or CFrame.new(0,12,0)
  77. GetHum().Died:connect(Died)
  78. end)
  79. GetHum().Died:connect(Died)
  80. print'rannering'
  81.  
  82. r2 = "Cyan"
  83.  
  84. --declarations
  85. PI=math.pi
  86. TAU=PI*2
  87. DEBRIS=game:service'Debris'
  88. mr,md=math.random,math.rad
  89. cfn,v3n=CFrame.new,Vector3.new
  90. _A=nil
  91. ang=function(x,y,z)local a=CFrame.Angles(x or 0,y or 0,z or 0)_A=a return a end
  92. RS=game:service'RunService'
  93. numkp=NumberSequenceKeypoint.new
  94. colkp=ColorSequenceKeypoint.new
  95. bcol=BrickColor.new
  96.  
  97. RS:UnbindFromRenderStep('Anim')
  98.  
  99. --player specific...
  100. player = game:service'Players'.LocalPlayer
  101. character = player.Character
  102. torso = character.Torso
  103. head = character.Head
  104. rarm = character['Right Arm']
  105. larm = character['Left Arm']
  106. rleg = character['Right Leg']
  107. rleg = character['Left Leg']
  108. human = character.Humanoid
  109.  
  110. --Utilities... who needs them?
  111.  
  112. function recurseHum(what)
  113. local res
  114. local p=what
  115. if what:IsA'Humanoid'then
  116. res=what
  117. else
  118. repeat
  119. p=p.Parent
  120. if p then
  121. local hum=p:FindFirstChild'Humanoid'
  122. if hum then
  123. res=hum
  124. break
  125. end
  126. end
  127. until p==nil
  128. end
  129. return res
  130. end
  131. function findHum(pos,rad,hum2)
  132. local hums={}
  133. function check(a)
  134. local res=false
  135. for i,ho in pairs(hums)do
  136. if a==ho then res=true end
  137. end
  138. return res
  139. end
  140. for i,v in pairs(Workspace:children())do
  141. if v:IsA'Model'and v~=Char and v~=(hum2 or Char) then
  142. for i,q in pairs(v:children())do
  143. if q:IsA'Humanoid' and q.Parent:FindFirstChild'Torso'and(q.Torso.Position-pos).magnitude < rad then
  144. if not check(q)then
  145. table.insert(hums,q)
  146. end
  147. end
  148. end
  149. end
  150. end
  151. return hums
  152. end
  153.  
  154. function checkY(p1,p2,range,range2)
  155. local function checko()
  156. return ( (l(p1).X>l(p2).X-range2 and l(p1).X<l(p2).X+range2) and (l(p1).Z>l(p2).Z-range2 and l(p1).Z<l(p2).Z+range2) )
  157. end
  158. if range2 then
  159. return (l(p1).Y > l(p2).Y-range and l(p2).Y < l(p2).Y+range) and checko()
  160. else
  161. return (l(p1).Y > l(p2).Y-range and l(p2).Y < l(p2).Y+range)
  162. end
  163. end
  164.  
  165. udim=function(a,b,c,d)
  166. if type(a)=='string'then
  167. x,y=tostring(a):match('([%+%d%.%-%/%*]+),([%+%d%.%-%/%*]+)')
  168. return UDim2.new(x or 0,x2 or 0,y or 0,y2 or 0)
  169. else
  170. return UDim2.new(a or 0,c or 0,b or 0,d or 0)
  171. end end
  172.  
  173. function l(a1,x,y,z,rx,ry,rz)
  174. local cf
  175. if tostring(a1):find(',') == nil then
  176. cf=a1.CFrame
  177. else cf=a1 end
  178. return cf*CFrame.new(x or 0,y or 0,z or 0)*CFrame.Angles(
  179. rx or 0,ry or 0,yz or 0)
  180. end
  181. function f(a) --turns thigns in to function returning the thing... f(l)(torso,0,2,0)
  182. return function(...)
  183. local args={...}
  184. return function() return a(unpack(args)) end
  185. end
  186. end
  187.  
  188. function isIn(what,tab) --returns true if what is in tab. isIn("Troll", {"Tomato", "Troll", "Strawberry") --> true
  189. local res=false
  190. for i,v in next,tab do
  191. if v==what then
  192. res = true
  193. break
  194. end
  195. end
  196. return res
  197. end
  198.  
  199. Weld = function(part0,part1,c0,c1,...) --over-engineered welding function which accepts many things
  200. local ar = {...}
  201. local cframe0,cframe1
  202. local function checkf()local res=true
  203. for i,v in pairs(ar)do
  204. if type(v) ~= 'number' then
  205. res=false
  206. end
  207. end
  208. return res
  209. end
  210. if type(c0) == 'table' then
  211. cframe0 = CFrame.new(c0[1] or 0, c0[2] or 0, c0[3] or 0) * CFrame.Angles(
  212. c0[4] or 0, c0[5] or 0, c0[6] or 0)
  213. elseif type(c0) == 'userdata' then
  214. cframe0 = c0
  215. elseif type(c0) == 'number' and checkf() then
  216. cframe0 = CFrame.new(c0 or 0,c1 or 0,ar[1] or 0) * CFrame.Angles(ar[2] or 0, ar[3] or 0, ar[4] or 0)
  217. end
  218. if type(c1) == 'table' then
  219. cframe1 = CFrame.new(c1[1] or 0, c1[2] or 0, c1[3] or 0) * CFrame.Angles(
  220. c1[4] or 0, c1[5] or 0, c1[6] or 0)
  221. elseif type(c1) == 'userdata' then
  222. cframe1 = c1
  223. elseif type(c1) == 'number' and (not c0 or (c0 and type(c0) == 'table')) then
  224. cframe1 = CFrame.new(c1 or 0, ar[1] or 0, ar[2] or 0) * CFrame.Angles(ar[3] or 0, ar[4] or 0, ar[5] or 0)
  225. end
  226. for i,v in pairs(ar)do
  227. if type(v) == 'table' then
  228. cframe1 = CFrame.new(v[1] or 0, v[2] or 0, v[3] or 0) * CFrame.new(v[4] or 0, v[5] or 0, v[6] or 0)
  229. elseif type(v) == 'userdata' then
  230. cframe1 = v
  231. end
  232. end
  233.  
  234. cframe0,cframe1 = cframe1,cframe0
  235. part0.Position=part1.Position
  236. local weld = Instance.new("Weld")
  237. weld.Part0 = part0
  238. weld.Part1 = part1
  239. weld.C0 = cframe0 or CFrame.new()
  240. weld.C1 = cframe1 or CFrame.new()
  241. if weld:IsA'Motor'then weld.MaxVelocity = set_maxvel or .1 end
  242. weld.Parent = part0
  243. _2=weld
  244. return weld
  245. end
  246.  
  247. mesh_ids = {
  248. spikeball = "rbxassetid://24388358";
  249. spike = "rbxassetid://1033714";
  250. ring = "rbxassetid://3270017";
  251. coil = 'rbxassetid://16606212';
  252. diamond = 'rbxassetid://9756362';
  253. rock = 'rbxassetid://1290033';
  254. gear = 'rbxassetid://156292343';
  255. crown = 'rbxassetid://20329976';
  256. orb = 'rbxassetid://34795798';
  257. heart = 'rbxassetid://431221914';
  258. dragon = 'rbxassetid://24478215';
  259. half_sphere = 'rbxassetid://475668276'
  260. }
  261. mesh_texs = {
  262. rock = 'rbxassetid://1290030';
  263. dragon = 'rbxassetid://25665033';
  264. }
  265. mesh_scales={
  266. diamond = v3n(0.75, 0.75, 0.75);
  267. spikeball = v3n(1.05, 1.05, 1.05);
  268. spike = v3n(0.5, 1.5, 0.5);
  269. gear = v3n(1.25,1.25,18);
  270. ring = v3n(1, 1, 6);
  271. coil = v3n(0.5, 0.5, 0.3);
  272. crown = v3n(0.6, 0.6, 0.6);
  273. orb = v3n(1, 1, 1);
  274. heart = v3n(0.25, 0.25, 0.4);
  275. dragon = v3n(0.4, 0.5, 0.4);
  276. half_sphere= v3n(0.005, 0.01, 0.005)
  277. }
  278. mesh_offsets={
  279. crown = v3n(0,.15,0);
  280. }
  281.  
  282. function bindMesh(mesh,Size)
  283. local mesh_name
  284. local size=Size or mesh.Parent.Size
  285. for name,id in next,mesh_ids do
  286. if mesh.MeshId==id then
  287. mesh_name=name
  288. end
  289. end
  290.  
  291. if not mesh_name then return end
  292. local mesh=mesh
  293. local con
  294. con=mesh.Parent.Changed:connect(function()
  295. local siz=mesh.Parent.Size
  296. mesh.Scale=siz*mesh_scales[mesh_name]
  297. if mesh_offsets[mesh_name] then
  298. mesh.Offset=siz*mesh_offsets[mesh_name]
  299. end
  300. end)
  301. return con
  302. end
  303. Mesh = function(parent,id,sx,sy,sz)
  304. local name = ( (id == 'cyl' and 'CylinderMesh') or (id == 'bl' and 'BlockMesh') or 'SpecialMesh')
  305. local mesh = Instance.new(name)
  306. if id == 's' then
  307. mesh.MeshType = Enum.MeshType.Sphere
  308. elseif id == 'w' then
  309. mesh.MeshType = Enum.MeshType.Wedge
  310. elseif id == 'h' then
  311. mesh.MeshType = Enum.MeshType.Head
  312. elseif string.find(id,"://") ~= nil then
  313. mesh.MeshId = id
  314. end
  315. mesh.Scale = Vector3.new(sx or 1, sy or 1, sz or 1)
  316. mesh.Parent = parent
  317. _3=mesh
  318. return mesh
  319. end
  320.  
  321. Edit = function(what)
  322. return function(args)
  323. for ind,obj in next,what do
  324. for arg,val in next,args do
  325. local child,argu = arg:match"(.+)%.(.+)"
  326. if child and argu then
  327. if pcall(function()return obj[child][argu] end) then
  328. obj[child][argu]=val
  329. end
  330. else
  331. if arg=='_F'then
  332. val(ind,obj)
  333. elseif pcall(function()return obj[arg]end) then
  334. obj[arg]=val
  335. end
  336. end
  337. end
  338. end
  339. end
  340. end
  341. New = function(what) --Synthetic caffeine for Instance.new
  342. local obj
  343. if type(what) ~= 'string' then
  344. obj=what:Clone()
  345. else
  346. obj=Instance.new(what)
  347. end
  348. if what=='Weld' then obj.Name='mujoint'end
  349. return function(bar)
  350. for arg,val in pairs(bar) do
  351. if arg == "_P" then
  352. obj.Parent = val
  353. elseif arg=="_PP" then
  354. obj.Part0=val[1]
  355. obj.Part1=val[2]
  356. elseif arg=='_F'then
  357. val(obj)
  358. else
  359. if pcall(function()return obj[arg] end) then
  360. obj[arg]=val
  361. end
  362. end
  363. end _4=obj
  364. return obj
  365. end
  366. end
  367.  
  368. set_parent,set_material=nil,nil
  369. set_maxvel,set_anchor=nil,nil
  370. set_collide=false
  371.  
  372. pcall(function() character['Knight']:Destroy() end) --removes old model.
  373. Main = New"Model"{_P=character;Name = 'Knight'}
  374.  
  375. _1,_2,_3,_4,_5,_6,_7,_8 = nil,nil,nil,nil,nil,nil,nil
  376. Part = function(x,y,z,col,tr)
  377. local p = New"Part"{
  378. _P=set_parent or ears or Main;
  379. BrickColor = BrickColor.new(col or set_color or "White");
  380. CanCollide = set_collide;
  381. Transparency = tr or 0;
  382. Size = Vector3.new(x or 0,y or 0,z or 0);
  383. Material = set_material or 'SmoothPlastic';
  384. Anchored = (set_anchor~=nil and set_anchor or false)
  385. }
  386. for _,sur in next,Enum.NormalId:GetEnumItems() do
  387. p[sur.Name..'Surface'] = 10
  388. end
  389. _1 = p
  390. return p
  391. end
  392.  
  393. function platefy(part)
  394. local x,z=part.Size.x,part.Size.z
  395. local y=part.Size.y
  396. local list={}
  397. --Cylinders...
  398. local p2=Part(y,x,y)Mesh(_1,'cyl') table.insert(list,_1)
  399. Weld(p2,p,0,0,-z/2,PI/2,0,PI/2)
  400.  
  401. local p2=Part(y,x,y)Mesh(_1,'cyl') table.insert(list,_1)
  402. Weld(p2,p,0,0,z/2,PI/2,0,PI/2)
  403.  
  404. local p2=Part(y,z,y)Mesh(_1,'cyl') table.insert(list,_1)
  405. Weld(p2,p,x/2,0,0,PI/2)
  406.  
  407. local p2=Part(y,z,y)Mesh(_1,'cyl') table.insert(list,_1)
  408. Weld(p2,p,-x/2,0,0,PI/2)
  409.  
  410. --Balls...
  411. local p2=Part(y,y,y)Mesh(p2,'s') table.insert(list,_1)
  412. Weld(p2,p,-x/2,0,-z/2)
  413.  
  414. local p2=Part(y,y,y)Mesh(p2,'s') table.insert(list,_1)
  415. Weld(p2,p,-x/2,0,z/2)
  416.  
  417. local p2=Part(y,y,y)Mesh(p2,'s') table.insert(list,_1)
  418. Weld(p2,p,x/2,0,-z/2)
  419.  
  420. local p2=Part(y,y,y)Mesh(p2,'s') table.insert(list,_1)
  421. Weld(p2,p,x/2,0,z/2)
  422.  
  423. part.Changed:connect(function(prop)
  424. Edit(list){Material=part.Material;Color=part.Color}
  425. end)
  426. end
  427.  
  428.  
  429. function findAllParts(pos,radius)
  430. local min,max = math.min,math.max
  431. local list={}
  432. local pos1,pos2=l(cfn(pos),-radius*3,-radius*3,-radius*3).p,l(cfn(pos),radius*3,radius*3,radius*3).p
  433. local reg=Region3.new(v3n(min(pos1.x,pos2.x),min(pos1.y,pos2.y),min(pos1.z,pos2.z)),
  434. v3n(max(pos1.x,pos2.x),max(pos1.y,pos2.y),max(pos1.z,pos2.z)))
  435. for i,v in pairs(Workspace:FindPartsInRegion3WithIgnoreList(reg,{character})) do
  436. if (v.Position-pos).magnitude<radius and v.Name~='Base' then
  437. table.insert(list,v)
  438. end
  439. end
  440. return list
  441. end
  442.  
  443. function forcePose(hum,lim)
  444. local t=hum.Torso
  445. local limb_names={'r_leg','l_leg','r_arm','l_arm'}
  446. if not t then return end
  447. --Right hip
  448. local limbs={huma=hum;torso=t;
  449. revert=function(self)
  450. for i,v in pairs(self)do
  451. if isIn(i,limb_names) then
  452. v.w:Destroy()
  453. end
  454. end
  455. self.huma.HipHeight=0
  456. self.huma:Move(v3n(0,0,0))
  457. if self['bg'] then
  458. self['bg']:Destroy()
  459. end
  460. end;
  461. }
  462. if t.Parent:FindFirstChild'Right Leg' then
  463. local invp=Part(1,1,1,'',1)_1.Anchored=false _1.Name='Hourai'_1.Parent=Main
  464. New"Weld"{_P=invp;_PP={invp,t};C1=cfn(.5,-1.5,0);} --Welded to torso
  465. local ww=New"Weld"{_P=invp;_PP={t.Parent['Right Leg'],invp};
  466. C0=cfn(0,.5,0);} --Right leg welded to invisible part
  467. -- ww.C0=cfn(-.05,0,0)*ang(0,0,md'-90')
  468. limbs.r_leg={w=ww;n_c0=ww.C0;n_c1=ww.C1}
  469. end
  470. --Left hip
  471. if t.Parent:FindFirstChild'Left Leg' then
  472. local invp=Part(1,1,1,'',1)_1.Anchored=false _1.Name='Hourai'_1.Parent=Main
  473. New"Weld"{_P=invp;_PP={invp,t}; C1=cfn(-.5,-1.5,0);}--Welded to torso
  474. local ww=New"Weld"{_P=invp;_PP={t.Parent['Left Leg'],invp};
  475. C0=cfn(0,.5,0);} --Right leg welded to invisible part
  476. -- ww.C0=cfn(.5,0,0)*ang(0,0,md'45')
  477. limbs.l_leg={w=ww;n_c0=ww.C0;n_c1=ww.C1}
  478. end
  479. --Right shoulder
  480. if t.Parent:FindFirstChild'Right Arm' then
  481. local invp=Part(1,1,1,'',1)_1.Anchored=false _1.Name='Hourai'_1.Parent=Main
  482. New"Weld"{_P=invp;_PP={invp,t};C1=cfn(1.5,.5,0)}
  483. local ww=New"Weld"{_P=invp;_PP={t.Parent['Right Arm'],invp};C0=cfn(0,.5,0)}
  484. -- ww.C0=cfn(-.15,0,-.5)*ang(md'45',0,md'-35')
  485. limbs.r_arm={w=ww;n_c0=ww.C0;n_c1=ww.C1}
  486. end
  487. --Left shoulder
  488. if t.Parent:FindFirstChild'Left Arm' then
  489. local invp=Part(1,1,1,'',1)_1.Anchored=false _1.Name='Hourai'_1.Parent=Main
  490. New"Weld"{_P=invp;_PP={invp,t};C1=cfn(-1.5,.5,0)}
  491. local ww=New"Weld"{_P=invp;_PP={t.Parent['Left Arm'],invp};C0=cfn(0,.5,0)}
  492. -- ww.C0=cfn(.15,0,-.5)*ang(md'45',0,md'35')
  493. limbs.l_arm={w=ww;n_c0=ww.C0;n_c1=ww.C1}
  494. end
  495. if lim then
  496. for i,v2 in pairs(limbs)do
  497. if not isIn(i,lim) and type(v2)=='table' then
  498. -- print(i)
  499. v2.w.Part1:Destroy()
  500. limbs[i]=nil
  501. end
  502. end end
  503. return function(tab)
  504. for i,v in pairs(tab)do
  505. if i=='hipheight'then limbs['huma'].HipHeight=v end
  506. if limbs[i] and i ~='hipheight' then
  507. limbs[i].w.C0=limbs[i].n_c0*(v:inverse())
  508. end
  509. end
  510. return limbs
  511. end
  512.  
  513. end
  514.  
  515. --Equipment...
  516.  
  517.  
  518. --Necklace...
  519. cp=Part(.5,.1,.5,'Black')Mesh(_1,'cyl')
  520. Weld(cp,torso,0,0,-.55,-PI/2)
  521.  
  522. e_parts={}
  523. for i=0,TAU,TAU/10 do
  524. Part(.1,.1,.1,'Black')Mesh(_1,'bl',.25,.5,.5)
  525. New"Weld"{_P=_1;_PP={_1,cp};C1=cfn(0,.11,0)*ang(0,i);C0=cfn(.15,0,0)}
  526. table.insert(e_parts,_1)
  527. end
  528.  
  529. p=Part(1,.1,.1)Mesh(_1,'bl',1,.5,.5)
  530. New"Weld"{_P=_1;_PP={p;cp};C1=ang(0,md'90'-md'35');C0=cfn(_1.Size.x/2+.25,0,0)}
  531.  
  532. p2=Part(1,.1,.1)Mesh(_1,'bl',1,.5,.5)
  533. New"Weld"{_P=_1;_PP={_1;p};C1=cfn(-.5,0,0)*ang(md'-5',0,PI/2);C0=cfn(.5,0,0)}
  534.  
  535.  
  536. p=Part(1,.1,.1)Mesh(_1,'bl',1,.5,.5)
  537. New"Weld"{_P=_1;_PP={p;cp};C1=ang(0,md'90'+md'35');C0=cfn(_1.Size.x/2+.25,0,0)}
  538.  
  539. p2=Part(1,.1,.1)Mesh(_1,'bl',1,.5,.5)
  540. New"Weld"{_P=_1;_PP={_1;p};C1=cfn(-.5,0,0)*ang(md'5',0,PI/2);C0=cfn(.5,0,0)}
  541.  
  542. pp=Part(.25,.1,.1)Weld(pp,torso,0,.75,.515)Mesh(_1,'bl',1,.5,.5)
  543.  
  544. pp2=Part(.7,.1,.1)New(_3){_P=pp2}
  545. New"Weld"{_P=pp2;_PP={_1,pp};C1=cfn(.125-.2,0,0)*ang(md'-5',0,md'-30');C0=cfn(_1.Size.x/2,0,0)}
  546.  
  547. pp2=Part(.7,.1,.1)New(_3){_P=pp2}
  548. New"Weld"{_P=pp2;_PP={_1,pp};C1=cfn(-.125+.2,0,0)*ang(md'-5',0,md'30');C0=cfn(-_1.Size.x/2,0,0)}
  549.  
  550. eye={parts=e_parts;center=cp;op=function(self,col)Edit(self.parts){Material='Neon';BrickColor=bcol(col or 'Bright red')}end;
  551. clo=function(self)Edit(self.parts){BrickColor=bcol'Black';Material='SmoothPlastic'}end}
  552. --/Necklace
  553.  
  554. --Bag
  555.  
  556.  
  557. bag=Part(1,1,1,'Brown')Mesh(bag,'rbxassetid://25921854',1.5,1.5,1.5)
  558. _3.TextureId='rbxassetid://3525940'
  559. Weld(bag,torso,-1.15,-1.15,-.3,md'-25',0,md'-25')
  560. --/Bag
  561. --/Equipment
  562.  
  563. --Animation stuff
  564. tokill={}
  565. RS:BindToRenderStep('Anim',2000,function() --Mainloop
  566. for i,v in pairs(Animations)do --execute animations
  567. v:Exec()
  568. end
  569. for i,v in pairs(tokill)do
  570. if v.Count>0 then
  571. pcall(function()v.pl.Character:BreakJoints()v.Count=v.Count-1 end)
  572. else
  573. table.remove(tokill,i)end
  574. end
  575. end)
  576.  
  577. do
  578. local c0 = {
  579. RightArm = cfn(1,0.5,0),
  580. LeftArm = cfn(-1,0.5,0),
  581. RightLeg = cfn(1,-1,0),
  582. LeftLeg = cfn(-1,-1,0),
  583. RootJoint = cfn(0,0,0),
  584. Neck = cfn(0,1,0)
  585. }
  586. local c1 = {
  587. RightArm = cfn(-0.5,0.5,0),
  588. LeftArm = cfn(0.5,0.5,0),
  589. RightLeg = cfn(0.5,1,0),
  590. LeftLeg = cfn(-0.5,1,0),
  591. RootJoint = cfn(0,0,0),
  592. Neck = cfn(0,-0.5,0)
  593. }
  594.  
  595. Animations={}
  596. Joints={}
  597.  
  598. Joint={
  599. new=function(name,weld,c0,c1)
  600. local joint={
  601. w=weld;
  602. part1=weld.Part1;
  603. n_c0=(c0 or weld.C0);
  604. n_c1=(c1 or weld.C1);
  605. name=name;
  606. previous=weld.C0;
  607. _can_kf=true;
  608. }
  609. joint.keys={};
  610. function joint:revertToOrig()
  611. self.w.C0=self.n_c0
  612. self.w.C1=self.n_c1
  613. end
  614. function joint:NewAnim(anim)
  615. self.keys[anim]={}
  616. end
  617. setmetatable(joint,{
  618. __mul=function(ta,val)
  619. return ta.n_c0*val
  620. end;
  621. })
  622.  
  623. getfenv()[name]=joint
  624. Joints[name]=joint
  625. return joint
  626. end
  627. }
  628. weld_container=New"Folder"{_P=Main}
  629.  
  630. Joint.new('rw',New"Weld"{_P = weld_container;_PP={nil;rarm};
  631. C0=c0.RightArm; C1=c1.RightArm})
  632.  
  633. function eq()
  634. Joints.rw.w.Part0=torso
  635. end
  636. function uneq()
  637. Joints.rw.w.Part0=nil
  638. end
  639.  
  640. Styles={
  641. Linear = function(alpha)
  642. return alpha
  643. end;
  644. easeInSine = function(alpha)
  645. local alpha = (1-math.cos(alpha*(math.pi/2)))
  646. return alpha
  647. end;
  648. easeOutSine = function(alpha)
  649. alpha = math.sin(alpha*(math.pi/2))
  650. return alpha
  651. end;
  652. easeInOutSine = function(alpha)
  653. alpha = alpha*2
  654. if alpha < 1 then
  655. return 0.5*Styles["easeInSine"](alpha)
  656. else
  657. return 0.5*Styles["easeOutSine"](alpha-1)+.5
  658. end
  659. end;
  660.  
  661. easeInQuadratic = function(alpha)
  662. alpha = alpha^2
  663. return alpha
  664. end;
  665. easeOutQuadratic = function(alpha)
  666. _alpha = 1-alpha
  667. alpha = 1-_alpha*_alpha
  668. return alpha
  669. end;
  670. easeInOutQuadratic = function(alpha)
  671. alpha = alpha*2
  672. if alpha < 1 then
  673. return 0.5*Styles["easeInQuadratic"](alpha)
  674. else
  675. return 0.5*Styles["easeOutQuadratic"](alpha-1)+0.5
  676. end
  677. end;
  678.  
  679. easeInCubic = function(alpha)
  680. alpha = alpha^3
  681. return alpha
  682. end;
  683. easeOutCubic = function(alpha)
  684. alpha = 1-alpha
  685. return 1-alpha^3
  686. end;
  687. easeInOutCubic = function(alpha)
  688. alpha = alpha*2
  689. if alpha < 1 then
  690. return 0.5*Styles["easeInCubic"](alpha)
  691. else
  692. return 0.5*Styles["easeOutCubic"](alpha-1)+.5
  693. end
  694. end;
  695. }
  696. function Interpolate(Type,p0,p1)
  697. local Data = {Style = Styles[Type],PointA = p0,PointB = p1}
  698. return function(Perc)
  699. local Perc = Data.Style(Perc)
  700. return Data.PointA:lerp(Data.PointB,Perc)
  701. end
  702. end
  703. -- Interpolate('easeInSine',CFrame.new(0,0,0),CFrame.new(10,10,10))(.5)
  704. -- error('script end')
  705. function NewLimbAnim(anim)
  706. for _,v in pairs(Joints)do
  707. v:NewAnim(anim)
  708. end
  709. end
  710.  
  711. function reset()
  712. local cc=newAnim(.5,false,_,true){
  713. [.5]=init;
  714. }cc:Play()cc:Wait()cc:Stop()
  715. for i,v in pairs(Joints)do v:revertToOrig() end
  716. -- for i,v in pairs(Animations)do v:Stop()end
  717. end
  718.  
  719. words={
  720. love={"I love you", "Gimme a hug", "You're gonna love me", "Love is \nall we have"}
  721. }
  722.  
  723.  
  724. function wordParticles(part,category,color,size,speed)
  725. local list=words[category]
  726. local bbg=New"BillboardGui"{_P=part;Adornee=part;Size=udim'4,4';AlwaysOnTop=true;}
  727. while wait(speed/4)do
  728. local tl=New"TextLabel"{_P=bbg;Size=udim(0,0);
  729. Text=list[#list];Position=udim(mr(),mr());FontSize=12;
  730. TextColor3=bcol(color).Color;TextTransparency=.6}
  731.  
  732. tl:TweenSizeAndPosition(udim'0,0',udim(math.random(),math.random()),'Out','Quad',speed,false,function()
  733. tl:Destroy()end)
  734. end
  735. end
  736.  
  737. function newAnim(lenght,loop,style,strange) --Epic wrapper for epic skids
  738. local t_len=0
  739. for i,v in pairs(Animations)do t_len=t_len+1 end
  740. local name='anim_'..tostring(t_len)
  741. -- NewLimbAnim(name)
  742. for _,v in pairs(Joints)do
  743. v:NewAnim(name)
  744. end
  745. local Anim={
  746. Span=lenght;Loop=false;
  747. Location=name;
  748. Count=0;stay=true;
  749. Keyframes={}; --Aliases
  750. Playing=false;Loop=false;
  751. reset_on_loop=true;
  752. Name=name;
  753. }
  754. for i,v in pairs(Joints)do
  755. Anim.Keyframes[i]=v
  756. end
  757. function Anim:Play()
  758. self.Playing=true
  759. self.Count=0
  760. end
  761. function Anim:Remove()
  762. Animations[self.Name]=nil
  763. end
  764. function Anim:Stop()
  765. self.Playing=false
  766. self.Count=0
  767. -- RevertAll()
  768. end
  769. local Time=tick()
  770. function Anim:Add(Time,limb,c0,c1)
  771. if Time>self.Span then error"one simply does not travel to future..."end
  772. local Tab={TimeOfAction=Time,Joint=limb,frame={C0=c0 or self.Keyframes[limb].n_c0,C1=c1 or self.Keyframes[limb].n_c1}}
  773. table.insert(self.Keyframes[limb].keys[self.Location],Tab)
  774. table.sort(self.Keyframes[limb].keys[self.Location],function(a,b) return a.TimeOfAction < b.TimeOfAction end)
  775. end
  776. function Anim:Exec(smooth)
  777. local DT=tick()-Time
  778. Time=tick()
  779. local First,Current,Next
  780. if self.Playing then --Check if anim can play
  781. self.Count=self.Count+DT --it goes up
  782. if self.Loop then --Reset when at end if loop
  783. if self.Count >= self.Span then
  784. self.Count=0
  785. if self.onCycle then
  786. self.onCycle(self)
  787. end
  788. end
  789. elseif not self.Loop then
  790. if self.Count >= self.Span then
  791. self.Count=self.Span
  792.  
  793. if self.onFinish then
  794. self.onFinish(self)
  795. end
  796. end
  797. end
  798. for i,v in pairs(self.Keyframes) do
  799. if v._can_kf then
  800. for i2,v2 in pairs(v.keys[self.Location]) do --cframes are stored in joints. self.Location is the name of animation
  801. First,Current,Next = v.keys[self.Location][1],v2,v.keys[self.Location][i2+1]
  802. if Next ~= nil and self.Count >= Current.TimeOfAction and self.Count <= Next.TimeOfAction then
  803. local Dis = (Next.TimeOfAction-Current.TimeOfAction)
  804. local Perc = (self.Count-Current.TimeOfAction)/Dis
  805. v.w.C0 = Interpolate(style or 'Linear',Current.frame.C0,Next.frame.C0)(Perc)
  806. v.w.C1 = Interpolate(style or 'Linear',Current.frame.C1,Next.frame.C1)(Perc)
  807. v.previous = v.w.C0
  808. end
  809. end end
  810. end
  811. end
  812. end
  813. Animations[name]=Anim
  814. local a=Anim
  815.  
  816. if loop~=nil then
  817. a.Loop=loop
  818. end
  819.  
  820. return function(kfs)
  821. if not kfs[0] then
  822. local t={}
  823. for j,v in pairs(Joints) do
  824. t[j]=v.previous*(v.n_c0:inverse())
  825. end
  826. kfs[0]=t
  827. end
  828. a.kfl=kfs
  829.  
  830. function a:last()
  831. local n,o=-1,nil
  832. for i,v in pairs(self.kfl)do
  833. if i>n then
  834. n=i o=v
  835. if type(o)=='number' then
  836. o=self.kfl[o]
  837. end
  838. end
  839. end
  840. return o
  841. end
  842. function Anim:Wait(num)
  843. repeat wait()until self.Count>=(num or self.Span)
  844. end
  845. if lenght==0 then
  846. for i,v in pairs(kfs) do
  847. a.Span=i
  848. end
  849.  
  850. end
  851. for tim,kf in pairs(kfs) do
  852.  
  853. local kk=kf
  854. if type(kf) =='number'then
  855. kk=kfs[kf]
  856. end
  857.  
  858. for j,v in pairs(kk) do
  859. if not strange then
  860. a:Add(tim,j, (v == 0 and Joints[j].n_c0 or (Joints[j].n_c0 * v) ))
  861. else
  862. a:Add(tim,j, (v == 0 and Joints[j].n_c0 or v ))
  863. end
  864. end
  865. end
  866. return Anim
  867. end
  868. end
  869.  
  870. end --Animation stuf... END
  871.  
  872. lazor_snd=New"Sound"{_P=Main;SoundId='rbxassetid://147627083';Pitch=.75;Volume=.8}
  873.  
  874. found=false
  875. ra=25
  876.  
  877. function rainbow()
  878. holding=true
  879. local kfs={}
  880. local kfs2={}
  881. local b=true
  882. for i=0,1,.1 do
  883. b=not b
  884. kfs[#kfs+1]=numkp(i,(b and i*5 or (i*5)/2))
  885. end
  886. while holding do
  887. eye:op"White"
  888. for o=1,3 do
  889. angle=ang(md(mr(-ra,ra)),md(mr(-ra,ra)))
  890. stp=l(eye.center)*ang(PI/2)
  891. enp=l(stp*angle,0,0,-20)
  892. local obj,pos=Workspace:FindPartOnRay(Ray.new(stp.p,enp.lookVector*20),character)
  893. if (obj and pos) then
  894. if obj.Parent.Name~='M_CAR' then
  895. local siz_x,siz_y,siz_z=obj.Size.x,obj.Size.y,obj.Size.z
  896. if (siz_x+siz_y+siz_z)/3 < 50 then
  897. local mag=(stp.p-pos).magnitude
  898. local r=Part(1,mag,1,'',.5)_1.Anchored=true _1.Color=eye.parts[1].Color
  899. _1.Material='Neon'
  900. _1.CFrame=(cfn(stp.p,pos)*cfn(0,0,-mag/2))*ang(PI/2)
  901.  
  902. local pp=Part(.1,.1,.1,'',1)--_1.Anchored=true
  903. _1.CFrame=cfn(l(r,0,-mag/2).p)
  904.  
  905. CJ=cfn(pp.Position)
  906. New"Weld"{_P=pp;_PP={pp,obj};C0=pp.CFrame:inverse()*CJ;
  907. C1=obj.CFrame:inverse()*CJ}
  908.  
  909. New"ParticleEmitter"{_P=pp;
  910. Size=NumberSequence.new(kfs);
  911. Transparency=NumberSequence.new{numkp(0,0);numkp(1,1)};
  912. Color=ColorSequence.new(r.Color);
  913. VelocitySpread=180;
  914. LightEmission=1;
  915. Lifetime=NumberRange.new(.25,2);
  916. Speed=NumberRange.new(1,4);
  917. }
  918.  
  919.  
  920. DEBRIS:AddItem(pp,1)
  921.  
  922. local hum=recurseHum(obj)
  923. if hum then hum:TakeDamage(-5)
  924.  
  925. end
  926.  
  927. DEBRIS:AddItem(r,.1)
  928. found=true
  929. end
  930. end
  931. end
  932. end
  933. wait()
  934. if found then found=false
  935. if not lazor_snd.IsPlaying then lazor_snd:Play()
  936. elseif not found and not lazor_snd.IsPlaying then lazor_snd:Stop()
  937. end
  938. end
  939. end
  940. lazor_snd:Stop()
  941. eye:clo()
  942. end
  943.  
  944. function laser(st,en,r)
  945. total_mag=(st-en).magnitude
  946. prev=cfn(st)
  947. local mo=New"Model"{_P=Main}
  948. set_parent=mo
  949. local pm={-1,1}
  950. for i=0,1,.1 do
  951. local pos=cfn(st):lerp(cfn(en),i)
  952. local pos2=pos*cfn(pm[mr(#pm)]*r,0,pm[mr(#pm)]*r)
  953. local mag=(prev.p-pos2.p).magnitude
  954. local laz=Part(.1,mag,.1,'Cyan',.5)_1.Anchored=true _1.Material='Neon'
  955. Mesh(_1,'bl',.5,1,.5)
  956. _1.CFrame=(cfn(prev.p,pos2.p)*cfn(0,0,-mag/2))*ang(PI/2)
  957. if i>.9 then
  958. _1.CFrame=(cfn(prev.p,pos2.p)*cfn(0,0,-mag/2))*ang(PI/2)
  959. end
  960. prev=pos2
  961. end
  962. set_parent=nil
  963. DEBRIS:AddItem(mo,.025)
  964. end
  965.  
  966. red_snd=New"Sound"{_P=Main;SoundId='rbxassetid://163826750'}
  967. function red()
  968. eye:op'Really red'
  969. local bl=Part(1,1,1,'Black',.75)_1.Material='Neon'
  970. local bl2=Part(1,1,1,'Bright red',.5)_1.Material='Slate'
  971. Weld(bl,eye.center)
  972. Weld(bl2,eye.center)
  973. local msh=Mesh(bl,'s')
  974. local ra=20
  975. local msh2=Mesh(bl2,'s')
  976. red_snd:Play()
  977. for i=0,1,.1 do
  978. msh.Scale=v3n(ra,ra,ra)*i
  979. msh2.Scale=v3n(ra-1,ra-1,ra-1)*i
  980. wait()
  981. end
  982.  
  983. local ign=nil
  984.  
  985. local humlist={}
  986. for o=0,3 do
  987. for i,v in pairs(findHum(torso.Position,ra))do
  988. if v.Parent~=character then
  989. for _,v2 in pairs(v.Parent:children())do
  990. if v2:IsA'Model'then v2:Destroy()
  991. elseif v2:IsA'Part' and v2.Name~='HumanoidRootPart'then
  992. v2.Transparency=0
  993. elseif v2:IsA'BaseScript' and not isIn(v2.Name,{'Animate','Health','Sound'})then
  994. v2.Disabled=true
  995. end
  996. end
  997. -- v.Health=v.Health-5
  998. v.Torso.Velocity=cfn(torso.Position,v.Torso.Position).lookVector*100
  999. Spawn(function()v.PlatformStand=true wait()v.PlatformStand=false end)
  1000. v:UnequipTools()
  1001. local pl=game.Players:GetPlayerFromCharacter(v.Parent)
  1002. ign=v.Parent
  1003. -- pacify(v.Parent)
  1004. if pl then
  1005. -- pl:ClearCharacterAppearance()
  1006. for i,v in pairs(pl.Backpack:children()) do
  1007. if v:IsA'BackpackItem' then
  1008. v:Destroy()
  1009. end
  1010. end
  1011. end end
  1012.  
  1013. end
  1014. end
  1015. for i=1,0,-.1 do
  1016. msh.Scale=v3n(ra,ra,ra)*i
  1017. msh2.Scale=v3n(ra-1,ra-1,ra-1)*i
  1018. wait()
  1019. end
  1020. bl:Destroy()bl2:Destroy()
  1021. eye:clo()
  1022. end
  1023.  
  1024. blue_snd=New"Sound"{_P=Main;SoundId='rbxassetid://314580397'}
  1025.  
  1026. function blue()
  1027. eye:op'Bright blue'
  1028. local poses={}
  1029.  
  1030. local ring=Part(1,1,1,'Bright blue')_1.Anchored=true _1.CFrame=l(torso,0,-2,0,PI/2)
  1031. local msh=Mesh(_1,mesh_ids.ring)
  1032. Spawn(function()
  1033. for i=0,1,.05 do
  1034. msh.Scale=v3n(i*40,i*40,1)
  1035. ring.Transparency=i
  1036. wait()
  1037. end
  1038. ring:Destroy()
  1039. end)
  1040. blue_snd:Play()
  1041. for i,v in pairs(findHum(l(torso).p,30)) do
  1042. if v.Parent~=character then
  1043. local pose=forcePose(v){
  1044. r_arm=cfn(-.4,0,-.5)*ang(md'45',0,md'-45');
  1045. l_arm=cfn(.4,0,-.5)*ang(md'45',0,md'45');
  1046. r_leg=ang(md'-80',0,md'25');
  1047. l_leg=ang(md'-80',0,md'-25');
  1048. hipheight=-.5;
  1049. }
  1050. pose.bg=New"BodyGyro"{_P=v.Torso;maxTorque=v3n(1,1,1)*9e+009;P=900000;cframe=cfn(l(v.Torso).p,l(torso).p)}
  1051. table.insert(poses,pose)
  1052. end end
  1053. local ti=tick()
  1054. if #poses>0 then
  1055. repeat
  1056. for i,v in pairs(poses)do
  1057. if v.bg then
  1058. v.bg.cframe=cfn(v.torso.Position,torso.Position)
  1059. local vec=(torso.Position-v.torso.Position)
  1060. if vec.magnitude>5 then
  1061. v.huma:MoveTo((cfn(torso.Position,v.torso.Position)*cfn(0,0,-5)).p)
  1062. else
  1063. v.huma:Move(v3n(0,0,0))
  1064. end
  1065. end
  1066. end wait()
  1067. until (tick()-ti)>3
  1068. for i,v in pairs(poses)do v:revert() end
  1069. else
  1070. wait'.1'
  1071. end
  1072. eye:clo()
  1073. end
  1074.  
  1075. function green()
  1076. local r=4
  1077. eye:op'Lime green'
  1078. holding=true
  1079. orig_ws=character.Humanoid.WalkSpeed
  1080. character.Humanoid.WalkSpeed=80
  1081. while holding do
  1082. for i=1,3 do
  1083. local p=Part(.1,.1,.1,'Lime green',.5)_1.Material='Neon'
  1084. _1.Anchored=true
  1085. _1.CFrame=l(torso,mr(-r,r),mr(-2,r),mr(-r,r),mr(-4,4),mr(-4,4),mr(-4,4))
  1086. DEBRIS:AddItem(_1,.1)
  1087. end
  1088. wait()
  1089. end
  1090. character.Humanoid.WalkSpeed=orig_ws
  1091. eye:clo()
  1092. end
  1093.  
  1094. function black()
  1095. for i,v in pairs(findHum(l(torso).p,10))do
  1096. if v.Parent~=character then
  1097. local pl=game.Players:GetPlayerFromCharacter(v.Parent)
  1098. if pl then
  1099. tokill[#tokill+1]={pl=pl;Count=4}
  1100. end
  1101. end
  1102. end
  1103. end
  1104.  
  1105. yel_snd=New"Sound"{_P=Main;SoundId='rbxassetid://138111999'}
  1106.  
  1107. function yellow()
  1108. eye:op'New Yeller'
  1109. yel_snd:Play()
  1110. local mod=New"Model"{_P=Workspace;Name='M_CAR'}
  1111. set_parent=mod
  1112. set_collide=true
  1113. cassis=Part(4,.75,6)_1.TopSurface='Weld'
  1114. _1.CFrame=l(torso,0,5,-7)
  1115.  
  1116. vs=New"VehicleSeat"{_P=mod;Size=v3n(2,1,2);CFrame=l(cassis,0,.75/2+.5,0,0,PI);BottomSurface='Weld';
  1117. BrickColor=bcol'Black'}vs.CanCollide=false
  1118. vs.MaxSpeed=7222
  1119.  
  1120. wheel=Part(5,5,5)_1.Shape=0
  1121. _1.RightSurface='Hinge'
  1122. _1.CFrame=l(cassis,-4.5,0,-3)
  1123.  
  1124. wheel2=Part(5,5,5)_1.Shape=0
  1125. _1.RightSurface='Hinge'
  1126. _1.CFrame=l(cassis,4.5,-.25,-3,0,PI)
  1127.  
  1128.  
  1129. wheel3=Part(5,5,5)_1.Shape=0
  1130. _1.RightSurface='Hinge'
  1131. _1.CFrame=l(cassis,-4.5,0,3)
  1132.  
  1133.  
  1134. wheel4=Part(5,5,5)_1.Shape=0
  1135. _1.RightSurface='Hinge'
  1136. _1.CFrame=l(cassis,4.5,-.25,3,0,PI)
  1137.  
  1138. set_collide=false
  1139. for i,v in pairs{wheel,wheel2,wheel3,wheel4}do
  1140. v.Transparency=.9
  1141. v.Material='Neon'
  1142. Part(4,4,4,'New Yeller')
  1143. Mesh(_1,'s')
  1144. Weld(_1,v)
  1145. end
  1146.  
  1147. --Lights...
  1148. kehys=Part(4,2,.1)Weld(_1,cassis,0,.75/2+1,3-.05)
  1149. Part(1,1,.1,'New Yeller')Weld(_1,kehys,-1,0,.1)_1.Material='Neon'
  1150. Part(1,1,.1,'New Yeller')Weld(_1,kehys,1,0,.1)_1.Material='Neon'
  1151.  
  1152.  
  1153. pil=Part(2,6,.1)Weld(_1,cassis,0,.75/2+_1.Size.y/2,-2)
  1154. roof=Part(5,4,.1)New"Weld"{_P=_1;_PP={_1,pil};C1=cfn(0,pil.Size.y/2,0)*ang(-PI/2);C0=cfn(0,_1.Size.y/2,0)}
  1155. local p=Part(5,4-2,.5)Weld(_1,roof,0,0,roof.Size.z/2+.25)
  1156. roof=p
  1157. local p2=Part(5,p.Size.z,1)Mesh(_1,'w')
  1158. Weld(_1,p,0,p.Size.y/2+p2.Size.z/2,0,PI/2)
  1159.  
  1160. local p2=Part(5,p.Size.z,1)Mesh(_1,'w')
  1161. Weld(_1,p,0,-(p.Size.y/2+p2.Size.z/2),0,PI/2,PI)
  1162. local seat=New"Seat"{_P=mod;Size=v3n(1,.2,1);BrickColor=bcol'Black';CanCollide=false}
  1163.  
  1164. Weld(seat,roof,0,0,seat.Size.y/2+roof.Size.z/2,-PI/2,0,PI)
  1165.  
  1166. Part(.1,6,1.5)Mesh(_1,'w')
  1167. Weld(_1,pil,-1-_1.Size.z/2,0,0,PI,PI/2)
  1168.  
  1169. Part(.1,6,_1.Size.z)Mesh(_1,'w')
  1170. Weld(_1,pil,1+_1.Size.z/2,0,0,PI,-PI/2)
  1171.  
  1172. p=Part(4,4,.1,'New Yeller',.75)
  1173. New"Weld"{_P=_1;_PP={_1,kehys};C1=cfn(0,1,0)*ang(-md(15));C0=cfn(0,-2,0)}
  1174.  
  1175. -- Part(2,2,2)Weld(_1,cassis,0,3)
  1176.  
  1177. set_collide=true
  1178.  
  1179. vs.MaxSpeed=80
  1180. mod:MakeJoints()
  1181. set_collide=true
  1182.  
  1183. set_parent=nil
  1184. set_collide=false
  1185.  
  1186. wait(.24)
  1187. eye:clo()
  1188. repeat wait()until yel_snd.TimePosition>=.37
  1189. eye:op'New Yeller'
  1190. repeat wait() until yel_snd.IsPlaying==false
  1191. eye:clo()
  1192. end
  1193.  
  1194. poses={
  1195. pickup={rw=cfn(0,.75,-.5)*ang(md'30',0,md'-60')*cfn(0,-1,0)};
  1196. }
  1197.  
  1198. function reset()
  1199. for _,v in pairs(Joints)do
  1200. v.beg=v.w.C0
  1201. end
  1202. for i=0,1,.1 do
  1203. for _,v in pairs(Joints)do
  1204. v.w.C0=v.beg:lerp(v.n_c0,i)
  1205. end
  1206. wait()
  1207. end
  1208. end
  1209.  
  1210. init={rw=0}
  1211. heart_snd=New"Sound"{_P=Main;SoundId='rbxassetid://130785805'}
  1212. heart_snd2=New"Sound"{_P=Main;SoundId='http://www.roblox.com/Asset/?id=11945266';Pitch=.5}
  1213. heart_snd3=New"Sound"{_P=Main;SoundId='rbxassetid://138014729';Name='Hoo'}
  1214. function white()
  1215. eq()
  1216. pickup.Count=0
  1217. pickup:Play()
  1218. repeat wait() until pickup.Count>=.5
  1219. repeat
  1220. local bullet=Part(1,1,1,'White')
  1221. local snd2=heart_snd2:Clone() snd2.Parent=bullet
  1222. local cl=heart_snd:Clone()cl.Parent=Main cl:Play()
  1223. DEBRIS:AddItem(cl,1)
  1224. local msh=Mesh(_1,mesh_ids.heart,.5,.5,.5)
  1225. _1.CFrame=cfn(l(rarm,0,-1.25).p)*(l(torso)-l(torso).p)
  1226. New"BodyVelocity"{_P=_1;velocity=l(torso).lookVector*30}
  1227. DEBRIS:AddItem(_1,2)
  1228. local con
  1229. con = bullet.Touched:connect(function(hit)
  1230. if hit:IsDescendantOf(character)then return end
  1231.  
  1232. local hum=recurseHum(hit)
  1233. if hum then
  1234. for _,v in pairs(findHum(l(hum.Torso).p,40))do
  1235. if v ~= hum then
  1236. v:MoveTo(l(hum.Torso).p)
  1237. if v.Parent~=character then
  1238. local poo=forcePose(v,{'r_arm','l_arm'}){
  1239. l_arm=ang(PI/2);
  1240. r_arm=ang(PI/2);
  1241. }
  1242. Spawn(function()wait(2)poo:revert()end)
  1243. end
  1244. if not v.Torso:FindFirstChild'Hoo'then
  1245. local heart=Part(1,1,1,'White')
  1246. Weld(_1,v.Torso,0,4)local msh=Mesh(_1,mesh_ids.heart,0,0,0)
  1247. local cl=heart_snd3:Clone()cl.Parent=v.Torso
  1248. cl:Play()
  1249. Spawn(function()
  1250. for i=0,1,.1 do
  1251. msh.Scale=v3n(.9*i,.9*i,.9*i)
  1252. wait()
  1253. end
  1254. heart:Destroy()end)
  1255. DEBRIS:AddItem(cl,1)
  1256. end
  1257.  
  1258.  
  1259. end
  1260. end
  1261. end
  1262. snd2:Play()
  1263. local hearts={}
  1264. con:disconnect()
  1265. for i=1,4 do
  1266. local mini=Part(.1,.1,.1,'White',.5)Mesh(_1,mesh_ids.heart,.25,.25,.25)
  1267. _1.CFrame=l(bullet,mr(-3,3),mr(-3,3),mr(-3,3))
  1268. _1.CFrame=cfn(mini.Position,bullet.Position)
  1269. New"BodyVelocity"{_P=_1;
  1270. -- velocity=(l(_1)*ang(mr(-5,5),mr(-5,5),mr(-5,5))).lookVector*20;
  1271. velocity=cfn(_1.Position,bullet.Position).lookVector*-20;
  1272. }
  1273. table.insert(hearts,mini)
  1274. end
  1275. bullet.Anchored=true
  1276. for i=0,1,.1 do
  1277. Edit(hearts){Transparency=i}
  1278. msh.Scale=v3n(.5,.5,.5)+v3n(i*4,i*4,i*4)
  1279. bullet.Transparency=i
  1280. wait()
  1281. end
  1282. bullet:Destroy()
  1283. for _,v in pairs(hearts)do v:Destroy()end
  1284. end)
  1285. wait(.1)
  1286. until pickup.Count>=pickup.Span
  1287. pickup:Stop()
  1288. for _,v in pairs(Joints)do
  1289. v.beg=v.previous
  1290. end
  1291. for i=0,1,.1 do
  1292. for _,v in pairs(Joints)do
  1293. v.w.C0=v.beg:lerp(v.n_c0,i)
  1294. end
  1295. wait()
  1296. end
  1297. uneq()
  1298. end
  1299.  
  1300. local function doSine(a,b,c)
  1301. return math.sin((tick()*a)+b)*c
  1302. end
  1303.  
  1304. function shake()
  1305. eq()
  1306. -- seq.Count=0
  1307. -- seq:Wait(.5)
  1308. -- local pp=Part(1,1,1)
  1309. -- pp.CFrame=torso.CFrame
  1310. -- _1.Anchored=true
  1311. local stcf=rw.n_c0*ang(md(90))
  1312. local victims=findHum(torso.Position,10,character)
  1313. if #victims>0 then
  1314. local victim=victims[1].Torso
  1315. holding=true
  1316. while holding do
  1317. rw.w.C0=stcf*ang(doSine(20,1,md'45')/2,0,doSine(10,100,md'45')/2)
  1318. local center=cfn(l(rarm,0,-7).p)
  1319. victim.CFrame=center
  1320. wait()
  1321. end
  1322. reset()
  1323. end
  1324. uneq()
  1325. end
  1326.  
  1327. knife_snd=New"Sound"{_P=Main;SoundId='http://www.roblox.com/asset?id=153647529'}
  1328. knife_snd2=New"Sound"{_P=Main;SoundId='http://www.roblox.com/Asset/?id=10756118';Pitch=3}
  1329. function sword()
  1330. eq()
  1331. seq:Play()
  1332. seq:Wait(.5)
  1333. local knife=Part(.4,3,.7)Mesh(knife,'rbxassetid://121944778')_3.TextureId='rbxassetid://121944805'
  1334. local kw=Weld(_1,rarm,0,-1.1,-1,-PI/2)
  1335. local cl=New(knife){_P=Main;BrickColor=bcol'New Yeller';
  1336. Transparency=.75;Reflectance=.25}_4.Mesh.Scale=v3n(1.01,1.01,1.01)
  1337. _4.Mesh.TextureId=''_4:BreakJoints()
  1338. Weld(_4,knife)
  1339. local snd=New(knife_snd2){_P=knife;Looped=true}
  1340. Spawn(function() --sparks
  1341. repeat laser(l(bag).p,knife.Position,1)wait()until knife.Parent==nil
  1342. end)
  1343. seq:Wait(1.3)
  1344. knife_snd:Play()
  1345. local bv=New"BodyVelocity"{_P=knife;velocity=l(torso).lookVector*50}
  1346. local bg=New"BodyGyro"{_P=knife;maxTorque=v3n(1,1,1)*9e+009;cframe=torso.CFrame*ang(-PI/2)}
  1347. knife.Touched:connect(function(hit)
  1348. if hit:IsDescendantOf(character)then return end
  1349. local r=md'65'
  1350. local hum=recurseHum(hit)
  1351. if hum and hum.Parent~= character then
  1352. Spawn(function()
  1353. snd:Play()
  1354. local tim=tick()
  1355. repeat
  1356. hum.Torso.CFrame=hum.Torso.CFrame*ang(mr(-r,r)*mr(),mr(-r,r)*mr(),mr(-r,r)*mr())
  1357. wait()
  1358. until (tick()-tim)>3
  1359. snd:Stop()
  1360. end)
  1361. end
  1362. bg:Destroy()bv:Destroy()
  1363. local CJ=cfn(knife.Position)
  1364. New"Weld"{_P=knife;_PP={knife,hit};C0=l(knife):inverse()*CJ;
  1365. C1=l(hit):inverse()*CJ
  1366. }
  1367. end)
  1368. DEBRIS:AddItem(knife,2)
  1369.  
  1370. kw:Destroy()
  1371. knife.CFrame=l(torso,1.5,.5,-1.1,-PI/2)
  1372. seq:Wait()
  1373. uneq()
  1374. end
  1375.  
  1376. pickup=newAnim(1){
  1377. [0]=init;
  1378. [.5]=poses.pickup;
  1379. [1]={rw=cfn(.3,.3,-.5)*ang(md'120',0,md'60')}
  1380. }
  1381. seq=newAnim(2){
  1382. [0]=init;
  1383. [.5]=poses.pickup;
  1384. [1.25]={rw=ang(md'170',0,0,md'75')};
  1385. [1.3]={rw=ang(md'90')};
  1386. [1.4]={rw=ang(md'-45')};
  1387. [2]=init;
  1388. }
  1389.  
  1390. klist={
  1391. fq=rainbow;
  1392. q=red;
  1393. e=blue;
  1394. r=yellow;
  1395. g=white;
  1396. t=function()for i,v in pairs(Workspace:children())do if v.Name=='M_CAR'then v:Destroy()end end end;
  1397. cq=green;
  1398. zq=sword;
  1399. }
  1400. equipped=false
  1401. attacking=false
  1402.  
  1403. pcall(function()player.Backpack['E.Y.E']:Destroy()end)
  1404. Tool=New"Tool"{_P=player.Backpack;Name='E.Y.E';RequiresHandle=false}
  1405. Tool.Equipped:connect(function(Mouse)
  1406. -- eq()
  1407. equipped=true
  1408. Mouse.KeyUp:connect(function(key)
  1409. for i,v in pairs(klist)do
  1410. if key == i:sub(1,1) and i:sub(2,2) == 'q' then
  1411. holding=false
  1412. end
  1413. end
  1414. end)
  1415. Mouse.KeyDown:connect(function(key)
  1416. if attacking then return end
  1417. attacking=true
  1418. for i,v in pairs(klist)do
  1419. if key==i:sub(1,1) then
  1420. v(Mouse)
  1421. end
  1422. end
  1423. attacking=false
  1424. end)
  1425. end)
  1426. Tool.Unequipped:connect(function()equipped=false end)
  1427. script.Name='riimu'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement