Advertisement
c00lkidd

MLG Ball

May 21st, 2016
909
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 35.86 KB | None | 0 0
  1. --Keybinds: Q, E, R, T, Y. Enjoy Little Skids. :)
  2. wait();
  3. local using = false
  4. local user=game:service'Players'.LocalPlayer;
  5. local char=user.Character;
  6. local hum=char.Humanoid;
  7. local head=char.Head;
  8. local part
  9. for i,v in ipairs{user.Backpack,char}do
  10. for i,v in ipairs(v:children())do
  11. if(v.Name=='ala_ball')then
  12. v:Destroy();
  13. end;
  14. end;
  15. end;
  16.  
  17.  
  18.  
  19. local function raycasting(pos,dir)
  20. local ray=Ray.new(pos,dir);
  21. return workspace:FindPartOnRay(ray,char,false)or workspace:FindPartOnRay(ray,char,true);
  22. end;
  23.  
  24. local function HSV(H,S,V)
  25. H = H % 360
  26. local C = V * S
  27. local H2 = H/60
  28. local X = C * (1 - math.abs((H2 %2) -1))
  29. local color = Color3.new(0,0,0)
  30. if H2 <= 0 then
  31. color = Color3.new(C,0,0)
  32. elseif 0 <= H2 and H2 <= 1 then
  33. color = Color3.new(C,X,0)
  34. elseif 1 <= H2 and H2 <= 2 then
  35. color = Color3.new(X,C,0)
  36. elseif 2 <= H2 and H2 <= 3 then
  37. color = Color3.new(0,C,X)
  38. elseif 3 <= H2 and H2 <= 4 then
  39. color = Color3.new(0,X,C)
  40. elseif 4 <= H2 and H2 <= 5 then
  41. color = Color3.new(X,0,C)
  42. elseif 5 <= H2 and H2 <= 6 then
  43. color = Color3.new(C,0,X)
  44. end
  45. local m = V - C
  46. return Color3.new(color.r + m, color.g + m, color.b + m)
  47. end
  48.  
  49.  
  50. local function MLGDisable()
  51. hum.PlatformStand=false;
  52. for i,v in ipairs(char:children())do
  53. if(v.Name=='ala_ball')then
  54. v:Destroy();
  55. end;
  56. end;
  57. for i,v in ipairs(char:children()) do
  58. if v:IsA'Part' then
  59. v.Transparency=0;
  60. end
  61. end
  62. hum.MaxHealth = 100
  63. char:findFirstChild'HumanoidRootPart'.Transparency=1
  64. part.Transparency = 1
  65. game:service'SoundService'.DistanceFactor = 10
  66. game:service'SoundService'.DopplerScale=1
  67. using = false
  68. end
  69.  
  70. game.Players.LocalPlayer:GetMouse().KeyDown:connect(function(key)
  71. if key == "y" then
  72. MLGDisable()
  73. end
  74. if key == "t" then
  75. if using == true then
  76. MLGDisable()
  77. end
  78. wait(0.15)
  79. if using == false then
  80. using = true
  81. local hue = 0
  82. local colur = 0
  83. local keys={};
  84.  
  85. game.Players.LocalPlayer:GetMouse().KeyDown:connect(function(key)
  86. keys[key]=true;
  87. end);
  88.  
  89. game.Players.LocalPlayer:GetMouse().KeyUp:connect(function(key)
  90. keys[key]=false;
  91. end);
  92.  
  93. game:service'SoundService'.DistanceFactor = 50
  94. game:service'SoundService'.DopplerScale=0
  95.  
  96. local speed=7;
  97. local max_speed=150;
  98.  
  99. hum.MaxHealth = math.huge
  100.  
  101. part=Instance.new'Part';
  102. part.Shape=0;
  103. part.Friction=10;
  104. part.Elasticity=1;
  105. part.TopSurface=0;
  106. part.FormFactor=0;
  107. part.Anchored=true;
  108. part.BottomSurface=0;
  109. part.Name='ala_ball';
  110. part.CanCollide=false;
  111. part.Transparency=1;
  112. part.CFrame=head.CFrame;
  113. part.Size=Vector3.new(10,10,10);
  114. part.Parent=char;
  115. local weld=Instance.new('Weld',part);
  116. weld.Part0=part;
  117. weld.Part1=head;
  118. part.Anchored=false;
  119. part.CanCollide=true;
  120. hum.PlatformStand=true;
  121. local sound=Instance.new('Sound',head);
  122. sound.SoundId='rbxassetid://204035618';
  123. sound.Volume=1;
  124. sound.Looped=true;
  125. sound:play();
  126. for i,v in ipairs(char:children()) do
  127. if v:IsA'Part' then
  128. v.Transparency=1;
  129. end
  130. end
  131. local PointLight = Instance.new('PointLight',head)
  132. PointLight.Range = 20
  133. local bbg = Instance.new('BillboardGui',head)
  134. bbg.Adornee=head
  135. bbg.Size=UDim2.new(8,0,8,0)
  136. bbg.AlwaysOnTop = true
  137. local img = Instance.new('ImageLabel',bbg)
  138. img.BackgroundTransparency=1
  139. img.Size=UDim2.new(1,0,1,0)
  140.  
  141. coroutine.wrap(function()
  142. while (part.Parent) do
  143. pcall(function()
  144. img.Image='rbxassetid://152333727'
  145. end)
  146. wait(0.1)
  147. pcall(function()
  148. img.Image='rbxassetid://152333747'
  149. end)
  150. wait(0.1)
  151. pcall(function()
  152. img.Image='rbxassetid://152333792'
  153. end)
  154. wait(0.1)
  155. pcall(function()
  156. img.Image='rbxassetid://152333817'
  157. end)
  158. wait(0.1)
  159. pcall(function()
  160. img.Image='rbxassetid://152333831'
  161. end)
  162. wait(0.1)
  163. pcall(function()
  164. img.Image='rbxassetid://152333855'
  165. end)
  166. wait(0.1)
  167. pcall(function()
  168. img.Image='rbxassetid://152333875'
  169. end)
  170. wait(0.1)
  171. pcall(function()
  172. img.Image='rbxassetid://152333892'
  173. end)
  174. end
  175. end)()
  176. while(part.Parent)do
  177. if(keys[' ']and raycasting(part.Position,Vector3.new(0,-10,0)))then
  178. part.Velocity=part.Velocity+Vector3.new(0,30,0);
  179. end;
  180.  
  181. if(keys.w or keys.a or keys.s or keys.d)then
  182. local r=-math.pi/2;
  183.  
  184. if(keys.s)then
  185. r=r-math.pi;
  186. end;
  187.  
  188. if(keys.a)then
  189. if(keys.w)then
  190. r=r-math.pi/4;
  191. elseif(keys.s)then
  192. r=r+math.pi/4;
  193. else
  194. r=r-math.pi/2;
  195. end;
  196. end;
  197.  
  198. if(keys.d)then
  199. if(keys.w)then
  200. r=r+math.pi/4;
  201. elseif(keys.s)then
  202. r=r-math.pi/4;
  203. else
  204. r=r+math.pi/2;
  205. end;
  206. end;
  207.  
  208. local cam=workspace.CurrentCamera;
  209. local crd=cam.CoordinateFrame;
  210. local dir=(crd.lookVector*Vector3.new(1,0,1)).unit;
  211. local x=dir.x;
  212. local z=dir.z;
  213. local dir=Vector3.new(
  214. math.cos(r)*x-math.sin(r)*z,
  215. 0,
  216. math.sin(r)*x+math.cos(r)*z
  217. );
  218. part.RotVelocity=dir*speed;
  219. speed=math.min(max_speed,speed+2/speed);
  220. else
  221. speed=math.min(math.abs(part.Velocity.magnitude/5),max_speed);
  222. end;
  223. wait();
  224. hue = ((hue+25)%360)
  225. colur = HSV(hue,1,1)
  226. PointLight.Color = Color3.new(colur.r,colur.g,colur.b)
  227. end;
  228. pcall(function()
  229. bbg:Destroy()
  230. end)
  231. pcall(function()
  232. sound:Destroy()
  233. end)
  234. pcall(function()
  235. PointLight:Destroy()
  236. end)
  237. end
  238. end
  239. if key == "r" then
  240. if using == true then
  241. MLGDisable()
  242. end
  243. wait(0.15)
  244. if using == false then
  245. using = true
  246. local hue = 0
  247. local colur = 0
  248. local keys={};
  249.  
  250. game.Players.LocalPlayer:GetMouse().KeyDown:connect(function(key)
  251. keys[key]=true;
  252. end);
  253.  
  254. game.Players.LocalPlayer:GetMouse().KeyUp:connect(function(key)
  255. keys[key]=false;
  256. end);
  257.  
  258. game:service'SoundService'.DistanceFactor = 50
  259. game:service'SoundService'.DopplerScale=0
  260.  
  261. local speed=7;
  262. local max_speed=150;
  263.  
  264. hum.MaxHealth = math.huge
  265.  
  266. part=Instance.new'Part';
  267. part.Shape=0;
  268. part.Friction=10;
  269. part.Elasticity=1;
  270. part.TopSurface=0;
  271. part.FormFactor=0;
  272. part.Anchored=true;
  273. part.BottomSurface=0;
  274. part.Name='ala_ball';
  275. part.CanCollide=false;
  276. part.Transparency=1;
  277. part.CFrame=head.CFrame;
  278. part.Size=Vector3.new(10,10,10);
  279. part.Parent=char;
  280. local weld=Instance.new('Weld',part);
  281. weld.Part0=part;
  282. weld.Part1=head;
  283. part.Anchored=false;
  284. part.CanCollide=true;
  285. hum.PlatformStand=true;
  286. local sound=Instance.new('Sound',head);
  287. sound.SoundId='rbxassetid://177276825';
  288. sound.Volume=1;
  289. sound.Looped=true;
  290. sound:play();
  291. for i,v in ipairs(char:children()) do
  292. if v:IsA'Part' then
  293. v.Transparency=1;
  294. end
  295. end
  296. local PointLight = Instance.new('PointLight',head)
  297. PointLight.Range = 20
  298. local bbg = Instance.new('BillboardGui',head)
  299. bbg.Adornee=head
  300. bbg.Size=UDim2.new(8,0,8,0)
  301. bbg.AlwaysOnTop = true
  302. local img = Instance.new('ImageLabel',bbg)
  303. img.BackgroundTransparency=1
  304. img.Size=UDim2.new(1,0,1,0)
  305. img.Image='rbxassetid://185945467'
  306. coroutine.wrap(function()
  307. while (part.Parent) do
  308. pcall(function()
  309. img.Image='rbxassetid://183747849'
  310. end)
  311. wait()
  312. pcall(function()
  313. img.Image='rbxassetid://183747854'
  314. end)
  315. wait()
  316. pcall(function()
  317. img.Image='rbxassetid://183747863'
  318. end)
  319. wait()
  320. pcall(function()
  321. img.Image='rbxassetid://183747870'
  322. end)
  323. wait()
  324. pcall(function()
  325. img.Image='rbxassetid://183747877'
  326. end)
  327. wait()
  328. pcall(function()
  329. img.Image='rbxassetid://183747879'
  330. end)
  331. wait()
  332. pcall(function()
  333. img.Image='rbxassetid://183747885'
  334. end)
  335. wait()
  336. pcall(function()
  337. img.Image='rbxassetid://183747890'
  338. end)
  339. end
  340. end)()
  341. while(part.Parent)do
  342. if(keys[' ']and raycasting(part.Position,Vector3.new(0,-10,0)))then
  343. part.Velocity=part.Velocity+Vector3.new(0,30,0);
  344. end;
  345.  
  346. if(keys.w or keys.a or keys.s or keys.d)then
  347. local r=-math.pi/2;
  348.  
  349. if(keys.s)then
  350. r=r-math.pi;
  351. end;
  352.  
  353. if(keys.a)then
  354. if(keys.w)then
  355. r=r-math.pi/4;
  356. elseif(keys.s)then
  357. r=r+math.pi/4;
  358. else
  359. r=r-math.pi/2;
  360. end;
  361. end;
  362.  
  363. if(keys.d)then
  364. if(keys.w)then
  365. r=r+math.pi/4;
  366. elseif(keys.s)then
  367. r=r-math.pi/4;
  368. else
  369. r=r+math.pi/2;
  370. end;
  371. end;
  372.  
  373. local cam=workspace.CurrentCamera;
  374. local crd=cam.CoordinateFrame;
  375. local dir=(crd.lookVector*Vector3.new(1,0,1)).unit;
  376. local x=dir.x;
  377. local z=dir.z;
  378. local dir=Vector3.new(
  379. math.cos(r)*x-math.sin(r)*z,
  380. 0,
  381. math.sin(r)*x+math.cos(r)*z
  382. );
  383. part.RotVelocity=dir*speed;
  384. speed=math.min(max_speed,speed+2/speed);
  385. else
  386. speed=math.min(math.abs(part.Velocity.magnitude/5),max_speed);
  387. end;
  388. wait();
  389. hue = ((hue+25)%360)
  390. colur = HSV(hue,1,1)
  391. PointLight.Color = Color3.new(colur.r,colur.g,colur.b)
  392. end;
  393. pcall(function()
  394. bbg:Destroy()
  395. end)
  396. pcall(function()
  397. sound:Destroy()
  398. end)
  399. pcall(function()
  400. PointLight:Destroy()
  401. end)
  402. end
  403. end
  404. if key == "e" then
  405. if using == true then
  406. MLGDisable()
  407. end
  408. wait(0.15)
  409. if using == false then
  410. using = true
  411. local hue = 0
  412. local colur = 0
  413. local keys={};
  414.  
  415. game.Players.LocalPlayer:GetMouse().KeyDown:connect(function(key)
  416. keys[key]=true;
  417. end);
  418.  
  419. game.Players.LocalPlayer:GetMouse().KeyUp:connect(function(key)
  420. keys[key]=false;
  421. end);
  422.  
  423. game:service'SoundService'.DistanceFactor = 50
  424. game:service'SoundService'.DopplerScale=0
  425.  
  426. local speed=7;
  427. local max_speed=150;
  428.  
  429. hum.MaxHealth = math.huge
  430.  
  431. local part=Instance.new'Part';
  432. part.Shape=0;
  433. part.Friction=10;
  434. part.Elasticity=1;
  435. part.TopSurface=0;
  436. part.FormFactor=0;
  437. part.Anchored=true;
  438. part.BottomSurface=0;
  439. part.Name='ala_ball';
  440. part.CanCollide=false;
  441. part.Transparency=1;
  442. part.CFrame=head.CFrame;
  443. part.Size=Vector3.new(10,10,10);
  444. part.Parent=char;
  445. local weld=Instance.new('Weld',part);
  446. weld.Part0=part;
  447. weld.Part1=head;
  448. part.Anchored=false;
  449. part.CanCollide=true;
  450. hum.PlatformStand=true;
  451. local sound=Instance.new('Sound',head);
  452. sound.SoundId='rbxassetid://228536200';
  453. sound.Volume=1;
  454. sound.Looped=true;
  455. sound:play();
  456. for i,v in ipairs(char:children()) do
  457. if v:IsA'Part' then
  458. v.Transparency=1;
  459. end
  460. end
  461. local PointLight = Instance.new('PointLight',head)
  462. PointLight.Range = 20
  463. local bbg = Instance.new('BillboardGui',head)
  464. bbg.Adornee=head
  465. bbg.Size=UDim2.new(8,0,8,0)
  466. bbg.AlwaysOnTop = true
  467. local img = Instance.new('ImageLabel',bbg)
  468. img.BackgroundTransparency=1
  469. img.Size=UDim2.new(1,0,1,0)
  470. img.Image='rbxassetid://185945467'
  471. coroutine.wrap(function()
  472. while (part.Parent) do
  473. pcall(function()
  474. img.Image='rbxassetid://131395838'
  475. end)
  476. wait()
  477. pcall(function()
  478. img.Image='rbxassetid://131395847'
  479. end)
  480. wait()
  481. pcall(function()
  482. img.Image='rbxassetid://131395855'
  483. end)
  484. wait()
  485. pcall(function()
  486. img.Image='rbxassetid://131395860'
  487. end)
  488. wait()
  489. pcall(function()
  490. img.Image='rbxassetid://131395868'
  491. end)
  492. wait()
  493. pcall(function()
  494. img.Image='rbxassetid://131395884'
  495. end)
  496. wait()
  497. pcall(function()
  498. img.Image='rbxassetid://131395884'
  499. end)
  500. wait()
  501. pcall(function()
  502. img.Image='rbxassetid://131395891'
  503. end)
  504. wait()
  505. pcall(function()
  506. img.Image='rbxassetid://131395897'
  507. end)
  508. wait()
  509. pcall(function()
  510. img.Image='rbxassetid://131395901'
  511. end)
  512. wait()
  513. pcall(function()
  514. img.Image='rbxassetid://131395946'
  515. end)
  516. wait()
  517. pcall(function()
  518. img.Image='rbxassetid://131395957'
  519. end)
  520. wait()
  521. pcall(function()
  522. img.Image='rbxassetid://131395966'
  523. end)
  524. wait()
  525. pcall(function()
  526. img.Image='rbxassetid://131395972'
  527. end)
  528. wait()
  529. pcall(function()
  530. img.Image='rbxassetid://131395979'
  531. end)
  532. wait()
  533. pcall(function()
  534. img.Image='rbxassetid://131395986'
  535. end)
  536. wait()
  537. pcall(function()
  538. img.Image='rbxassetid://131395989'
  539. end)
  540. wait()
  541. pcall(function()
  542. img.Image='rbxassetid://131395993'
  543. end)
  544. wait()
  545. pcall(function()
  546. img.Image='rbxassetid://131395997'
  547. end)
  548. wait()
  549. pcall(function()
  550. img.Image='rbxassetid://131396003'
  551. end)
  552. wait()
  553. pcall(function()
  554. img.Image='rbxassetid://131396007'
  555. end)
  556. wait()
  557. pcall(function()
  558. img.Image='rbxassetid://131396012'
  559. end)
  560. wait()
  561. pcall(function()
  562. img.Image='rbxassetid://131396016'
  563. end)
  564. wait()
  565. pcall(function()
  566. img.Image='rbxassetid://131396019'
  567. end)
  568. wait()
  569. pcall(function()
  570. img.Image='rbxassetid://131396024'
  571. end)
  572. wait()
  573. pcall(function()
  574. img.Image='rbxassetid://131396029'
  575. end)
  576. wait()
  577. pcall(function()
  578. img.Image='rbxassetid://131396037'
  579. end)
  580. wait()
  581. pcall(function()
  582. img.Image='rbxassetid://131396042'
  583. end)
  584. wait()
  585. pcall(function()
  586. img.Image='rbxassetid://131396044'
  587. end)
  588. wait()
  589. pcall(function()
  590. img.Image='rbxassetid://131396046'
  591. end)
  592. wait()
  593. pcall(function()
  594. img.Image='rbxassetid://131396054'
  595. end)
  596. wait()
  597. pcall(function()
  598. img.Image='rbxassetid://131396063'
  599. end)
  600. wait()
  601. pcall(function()
  602. img.Image='rbxassetid://131396068'
  603. end)
  604. wait()
  605. pcall(function()
  606. img.Image='rbxassetid://131396072'
  607. end)
  608. wait()
  609. pcall(function()
  610. img.Image='rbxassetid://131396078'
  611. end)
  612. wait()
  613. pcall(function()
  614. img.Image='rbxassetid://131396091'
  615. end)
  616. wait()
  617. pcall(function()
  618. img.Image='rbxassetid://131396098'
  619. end)
  620. wait()
  621. pcall(function()
  622. img.Image='rbxassetid://131396102'
  623. end)
  624. wait()
  625. pcall(function()
  626. img.Image='rbxassetid://131396108'
  627. end)
  628. wait()
  629. pcall(function()
  630. img.Image='rbxassetid://131396110'
  631. end)
  632. wait()
  633. pcall(function()
  634. img.Image='rbxassetid://131396113'
  635. end)
  636. wait()
  637. pcall(function()
  638. img.Image='rbxassetid://131396116'
  639. end)
  640. wait()
  641. pcall(function()
  642. img.Image='rbxassetid://131396121'
  643. end)
  644. wait()
  645. pcall(function()
  646. img.Image='rbxassetid://131396125'
  647. end)
  648. wait()
  649. pcall(function()
  650. img.Image='rbxassetid://131396133'
  651. end)
  652. wait()
  653. pcall(function()
  654. img.Image='rbxassetid://131396137'
  655. end)
  656. wait()
  657. pcall(function()
  658. img.Image='rbxassetid://131396142'
  659. end)
  660. wait()
  661. pcall(function()
  662. img.Image='rbxassetid://131396146'
  663. end)
  664. wait()
  665. pcall(function()
  666. img.Image='rbxassetid://131396156'
  667. end)
  668. wait()
  669. pcall(function()
  670. img.Image='rbxassetid://131396162'
  671. end)
  672. wait()
  673. pcall(function()
  674. img.Image='rbxassetid://131396164'
  675. end)
  676. wait()
  677. pcall(function()
  678. img.Image='rbxassetid://131396169'
  679. end)
  680. wait()
  681. pcall(function()
  682. img.Image='rbxassetid://131396173'
  683. end)
  684. wait()
  685. pcall(function()
  686. img.Image='rbxassetid://131396176'
  687. end)
  688. wait()
  689. pcall(function()
  690. img.Image='rbxassetid://131396181'
  691. end)
  692. wait()
  693. pcall(function()
  694. img.Image='rbxassetid://131396185'
  695. end)
  696. wait()
  697. pcall(function()
  698. img.Image='rbxassetid://131396188'
  699. end)
  700. wait()
  701. pcall(function()
  702. img.Image='rbxassetid://131396192'
  703. end)
  704. wait()
  705. end
  706. end)()
  707. while(part.Parent)do
  708. if(keys[' ']and raycasting(part.Position,Vector3.new(0,-10,0)))then
  709. part.Velocity=part.Velocity+Vector3.new(0,30,0);
  710. end;
  711.  
  712. if(keys.w or keys.a or keys.s or keys.d)then
  713. local r=-math.pi/2;
  714.  
  715. if(keys.s)then
  716. r=r-math.pi;
  717. end;
  718.  
  719. if(keys.a)then
  720. if(keys.w)then
  721. r=r-math.pi/4;
  722. elseif(keys.s)then
  723. r=r+math.pi/4;
  724. else
  725. r=r-math.pi/2;
  726. end;
  727. end;
  728.  
  729. if(keys.d)then
  730. if(keys.w)then
  731. r=r+math.pi/4;
  732. elseif(keys.s)then
  733. r=r-math.pi/4;
  734. else
  735. r=r+math.pi/2;
  736. end;
  737. end;
  738.  
  739. local cam=workspace.CurrentCamera;
  740. local crd=cam.CoordinateFrame;
  741. local dir=(crd.lookVector*Vector3.new(1,0,1)).unit;
  742. local x=dir.x;
  743. local z=dir.z;
  744. local dir=Vector3.new(
  745. math.cos(r)*x-math.sin(r)*z,
  746. 0,
  747. math.sin(r)*x+math.cos(r)*z
  748. );
  749. part.RotVelocity=dir*speed;
  750. speed=math.min(max_speed,speed+2/speed);
  751. else
  752. speed=math.min(math.abs(part.Velocity.magnitude/5),max_speed);
  753. end;
  754. wait();
  755. hue = ((hue+25)%360)
  756. colur = HSV(hue,1,1)
  757. PointLight.Color = Color3.new(colur.r,colur.g,colur.b)
  758. end;
  759. pcall(function()
  760. bbg:Destroy()
  761. end)
  762. pcall(function()
  763. sound:Destroy()
  764. end)
  765. pcall(function()
  766. PointLight:Destroy()
  767. end)
  768. end
  769. end
  770. if key == "q" then
  771. if using == true then
  772. MLGDisable()
  773. end
  774. wait(0.15)
  775. if using == false then
  776. using = true
  777. local hue = 0
  778. local colur = 0
  779. local keys={};
  780.  
  781. game.Players.LocalPlayer:GetMouse().KeyDown:connect(function(key)
  782. keys[key]=true;
  783. end);
  784.  
  785. game.Players.LocalPlayer:GetMouse().KeyUp:connect(function(key)
  786. keys[key]=false;
  787. end);
  788.  
  789. game:service'SoundService'.DistanceFactor = 50
  790. game:service'SoundService'.DopplerScale=0
  791.  
  792. local speed=7;
  793. local max_speed=150;
  794.  
  795. hum.MaxHealth = math.huge
  796.  
  797. part=Instance.new'Part';
  798. part.Shape=0;
  799. part.Friction=10;
  800. part.Elasticity=1;
  801. part.TopSurface=0;
  802. part.FormFactor=0;
  803. part.Anchored=true;
  804. part.BottomSurface=0;
  805. part.Name='ala_ball';
  806. part.CanCollide=false;
  807. part.Transparency=1;
  808. part.CFrame=head.CFrame;
  809. part.Size=Vector3.new(10,10,10);
  810. part.Parent=char;
  811. local weld=Instance.new('Weld',part);
  812. weld.Part0=part;
  813. weld.Part1=head;
  814. part.Anchored=false;
  815. part.CanCollide=true;
  816. hum.PlatformStand=true;
  817. local sound=Instance.new('Sound',head);
  818. sound.SoundId='rbxassetid://177078299';
  819. sound.Volume=1;
  820. sound.Looped=true;
  821. sound:play();
  822. for i,v in ipairs(char:children()) do
  823. if v:IsA'Part' then
  824. v.Transparency=1;
  825. end
  826. end
  827. local PointLight = Instance.new('PointLight',head)
  828. PointLight.Range = 20
  829. local bbg = Instance.new('BillboardGui',head)
  830. bbg.Adornee=head
  831. bbg.Size=UDim2.new(8,0,8,0)
  832. bbg.AlwaysOnTop = true
  833. local img = Instance.new('ImageLabel',bbg)
  834. img.BackgroundTransparency=1
  835. img.Size=UDim2.new(1,0,1,0)
  836. img.Image='rbxassetid://185945467'
  837. coroutine.wrap(function()
  838. while (part.Parent) do
  839. pcall(function()
  840. img.Image='rbxassetid://185945467'
  841. end)
  842. wait()
  843. pcall(function()
  844. img.Image='rbxassetid://185945486'
  845. end)
  846. wait()
  847. pcall(function()
  848. img.Image='rbxassetid://185945493'
  849. end)
  850. wait()
  851. pcall(function()
  852. img.Image='rbxassetid://185945515'
  853. end)
  854. wait()
  855. pcall(function()
  856. img.Image='rbxassetid://185945527'
  857. end)
  858. wait()
  859. pcall(function()
  860. img.Image='rbxassetid://185945553'
  861. end)
  862. wait()
  863. pcall(function()
  864. img.Image='rbxassetid://185945573'
  865. end)
  866. wait()
  867. pcall(function()
  868. img.Image='rbxassetid://185945586'
  869. end)
  870. wait()
  871. pcall(function()
  872. img.Image='rbxassetid://185945612'
  873. end)
  874. wait()
  875. pcall(function()
  876. img.Image='rbxassetid://185945634'
  877. end)
  878. wait()
  879. end
  880. end)()
  881. while(part.Parent)do
  882. if(keys[' ']and raycasting(part.Position,Vector3.new(0,-10,0)))then
  883. part.Velocity=part.Velocity+Vector3.new(0,30,0);
  884. end;
  885.  
  886. if(keys.w or keys.a or keys.s or keys.d)then
  887. local r=-math.pi/2;
  888.  
  889. if(keys.s)then
  890. r=r-math.pi;
  891. end;
  892.  
  893. if(keys.a)then
  894. if(keys.w)then
  895. r=r-math.pi/4;
  896. elseif(keys.s)then
  897. r=r+math.pi/4;
  898. else
  899. r=r-math.pi/2;
  900. end;
  901. end;
  902.  
  903. if(keys.d)then
  904. if(keys.w)then
  905. r=r+math.pi/4;
  906. elseif(keys.s)then
  907. r=r-math.pi/4;
  908. else
  909. r=r+math.pi/2;
  910. end;
  911. end;
  912.  
  913. local cam=workspace.CurrentCamera;
  914. local crd=cam.CoordinateFrame;
  915. local dir=(crd.lookVector*Vector3.new(1,0,1)).unit;
  916. local x=dir.x;
  917. local z=dir.z;
  918. local dir=Vector3.new(
  919. math.cos(r)*x-math.sin(r)*z,
  920. 0,
  921. math.sin(r)*x+math.cos(r)*z
  922. );
  923. part.RotVelocity=dir*speed;
  924. speed=math.min(max_speed,speed+2/speed);
  925. else
  926. speed=math.min(math.abs(part.Velocity.magnitude/5),max_speed);
  927. end;
  928. wait();
  929. hue = ((hue+25)%360)
  930. colur = HSV(hue,1,1)
  931. PointLight.Color = Color3.new(colur.r,colur.g,colur.b)
  932. end;
  933. pcall(function()
  934. bbg:Destroy()
  935. end)
  936. pcall(function()
  937. sound:Destroy()
  938. end)
  939. pcall(function()
  940. PointLight:Destroy()
  941. end)
  942. end
  943. end
  944. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement