Advertisement
Darkelx

Untitled

Feb 23rd, 2019
532
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 33.38 KB | None | 0 0
  1. --https://github.com/Mokiros/roblox-FE-compatibility
  2. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  3. local Player,game,owner = owner,game
  4. local RealPlayer = Player
  5. do
  6. print("FE Compatibility code V2 by Mokiros")
  7. local RealPlayer = RealPlayer
  8. script.Parent = RealPlayer.Character
  9.  
  10. --Fake event to make stuff like Mouse.KeyDown work
  11. local Disconnect_Function = function(this)
  12. this[1].Functions[this[2]] = nil
  13. end
  14. local Disconnect_Metatable = {__index={disconnect=Disconnect_Function,Disconnect=Disconnect_Function}}
  15. local FakeEvent_Metatable = {__index={
  16. Connect = function(this,f)
  17. local i = tostring(math.random(0,10000))
  18. while this.Functions[i] do
  19. i = tostring(math.random(0,10000))
  20. end
  21. this.Functions[i] = f
  22. return setmetatable({this,i},Disconnect_Metatable)
  23. end
  24. }}
  25. FakeEvent_Metatable.__index.connect = FakeEvent_Metatable.__index.Connect
  26. local function fakeEvent()
  27. return setmetatable({Functions={}},FakeEvent_Metatable)
  28. end
  29.  
  30. --Creating fake input objects with fake variables
  31. local FakeMouse = {Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()}
  32. FakeMouse.keyUp = FakeMouse.KeyUp
  33. FakeMouse.keyDown = FakeMouse.KeyDown
  34. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  35. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  36. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  37. end}
  38. --Merged 2 functions into one by checking amount of arguments
  39. CAS.UnbindAction = CAS.BindAction
  40.  
  41. --This function will trigger the events that have been :Connect()'ed
  42. local function TriggerEvent(self,ev,...)
  43. for _,f in pairs(self[ev].Functions) do
  44. f(...)
  45. end
  46. end
  47. FakeMouse.TriggerEvent = TriggerEvent
  48. UIS.TriggerEvent = TriggerEvent
  49.  
  50. --Client communication
  51. local Event = Instance.new("RemoteEvent")
  52. Event.Name = "UserInput_Event"
  53. Event.OnServerEvent:Connect(function(plr,io)
  54. if plr~=RealPlayer then return end
  55. FakeMouse.Target = io.Target
  56. FakeMouse.Hit = io.Hit
  57. if not io.isMouse then
  58. local b = io.UserInputState == Enum.UserInputState.Begin
  59. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  60. return FakeMouse:TriggerEvent(b and "Button1Down" or "Button1Up")
  61. end
  62. if io.UserInputType == Enum.UserInputType.MouseButton2 then
  63. return FakeMouse:TriggerEvent(b and "Button2Down" or "Button2Up")
  64. end
  65. for _,t in pairs(CAS.Actions) do
  66. for _,k in pairs(t.Keys) do
  67. if k==io.KeyCode then
  68. t.Function(t.Name,io.UserInputState,io)
  69. end
  70. end
  71. end
  72. FakeMouse:TriggerEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  73. UIS:TriggerEvent(b and "InputBegan" or "InputEnded",io,false)
  74. end
  75. end)
  76. Event.Parent = NLS([==[local Event = script:WaitForChild("UserInput_Event")
  77. local Mouse = owner:GetMouse()
  78. local UIS = game:GetService("UserInputService")
  79. local input = function(io,RobloxHandled)
  80. if RobloxHandled then return end
  81. --Since InputObject is a client-side instance, we create and pass table instead
  82. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  83. end
  84. UIS.InputBegan:Connect(input)
  85. UIS.InputEnded:Connect(input)
  86. local h,t
  87. --Give the server mouse data every second frame, but only if the values changed
  88. --If player is not moving their mouse, client won't fire events
  89. local HB = game:GetService("RunService").Heartbeat
  90. while true do
  91. if h~=Mouse.Hit or t~=Mouse.Target then
  92. h,t=Mouse.Hit,Mouse.Target
  93. Event:FireServer({isMouse=true,Target=t,Hit=h})
  94. end
  95. --Wait 2 frames
  96. for i=1,2 do
  97. HB:Wait()
  98. end
  99. end]==],script)
  100.  
  101. ----Sandboxed game object that allows the usage of client-side methods and services
  102. --Real game object
  103. local RealGame = game
  104.  
  105. --Metatable for fake service
  106. local FakeService_Metatable = {
  107. __index = function(self,k)
  108. local s = rawget(self,"_RealService")
  109. if s then
  110. return typeof(s[k])=="function"
  111. and function(_,...)return s[k](s,...)end or s[k]
  112. end
  113. end,
  114. __newindex = function(self,k,v)
  115. local s = rawget(self,"_RealService")
  116. if s then s[k]=v end
  117. end
  118. }
  119. local function FakeService(t,RealService)
  120. t._RealService = typeof(RealService)=="string" and RealGame:GetService(RealService) or RealService
  121. return setmetatable(t,FakeService_Metatable)
  122. end
  123.  
  124. --Fake game object
  125. local FakeGame = {
  126. GetService = function(self,s)
  127. return rawget(self,s) or RealGame:GetService(s)
  128. end,
  129. Players = FakeService({
  130. LocalPlayer = FakeService({GetMouse=function(self)return FakeMouse end},Player)
  131. },"Players"),
  132. UserInputService = FakeService(UIS,"UserInputService"),
  133. ContextActionService = FakeService(CAS,"ContextActionService"),
  134. RunService = FakeService({
  135. _btrs = {},
  136. RenderStepped = RealGame:GetService("RunService").Heartbeat,
  137. BindToRenderStep = function(self,name,_,fun)
  138. self._btrs[name] = self.Heartbeat:Connect(fun)
  139. end,
  140. UnbindFromRenderStep = function(self,name)
  141. self._btrs[name]:Disconnect()
  142. end,
  143. },"RunService")
  144. }
  145. rawset(FakeGame.Players,"localPlayer",FakeGame.Players.LocalPlayer)
  146. FakeGame.service = FakeGame.GetService
  147. FakeService(FakeGame,game)
  148. --Changing owner to fake player object to support owner:GetMouse()
  149. game,owner = FakeGame,FakeGame.Players.LocalPlayer
  150. end
  151.  
  152. wait(0)
  153. Player = game.Players.LocalPlayer
  154.  
  155. local count = 0
  156. local countspeed = 1
  157. local sine = 0
  158. local sinespeed = 1
  159. local angle = nil
  160. local global_wait = 0
  161. local showtag = false
  162.  
  163.  
  164. --dance booleans--
  165. local jerk = false
  166. local party = false
  167. local canttouch = false
  168. local happy = false
  169. local spin = false
  170. local thriller = false
  171. local barrel = false
  172. local sax = false
  173. local spooky = false
  174. local stride = false
  175. local shuffle = false
  176. local rock = false
  177. local gagnam = false
  178. local snoop = false
  179. local darude = false
  180. local taco = false
  181. ------------------
  182. --dance accessory--
  183. local barrelbrick = nil
  184. local saxtool = nil
  185. -------------------
  186. --custom animate--
  187. local walk = false
  188. local jump = false
  189. local sit = false
  190. local run = false
  191. ------------------
  192. --walk keys--
  193. local W = false
  194. local A = false
  195. local S = false
  196. local D = false
  197. -------------
  198. local m = Instance.new("Model",game.Players.LocalPlayer.Character) m.Name = "ModelParts"
  199. local miniweld = nil
  200. local rootpart = nil
  201.  
  202. local Mouse = nil
  203. local Animate = nil
  204. local Music = nil
  205. local Asset = "http://www.roblox.com/asset/?id="
  206. local Animating = nil
  207. local humanoid = nil
  208. local face = nil
  209.  
  210. local head = nil
  211. local torso = nil
  212. local ra = nil
  213. local la = nil
  214. local rl = nil
  215. local ll = nil
  216. local rs = nil
  217. local ls = nil
  218. local rh = nil
  219. local lh = nil
  220. local neck = nil
  221. local rj = nil
  222.  
  223. local char = nil
  224. local Hat1 = nil
  225. local Hat2 = nil
  226. local a,b = nil
  227.  
  228. ----------musics-----------------
  229. local M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12,M13,M14,M15,M16 = nil
  230. ---------------------------------
  231.  
  232. local mesh,meshids,textureids,w
  233.  
  234. function fm(parent,meshid,x,y,z,meshtexture)
  235. if meshid == "cylinder" then
  236. mesh = Instance.new("CylinderMesh",parent)
  237. mesh.Scale = Vector3.new(x,y,z)
  238. return mesh
  239. else
  240. mesh = Instance.new("SpecialMesh",parent)
  241. if meshid ~= "sphere" then
  242. if type(meshid) == "number" then mesh.MeshId = "rbxassetid://"..meshid else
  243. mesh.MeshId = "rbxassetid://"..meshids[meshid]
  244. end
  245. else mesh.MeshType = 3 end
  246. mesh.Scale = Vector3.new(x,y,z)
  247. if meshtexture ~= nil then
  248. if type(meshtexture) == "number" then
  249. mesh.TextureId = "rbxassetid://"..meshtexture
  250. else
  251. mesh.TextureId = "rbxassetid://"..textureids[meshtexture] end
  252. end
  253. return mesh
  254. end
  255. end
  256.  
  257. function P(x,y,z,color,transparency,cancollide,anchored,parent,typee)
  258. if typee ~= nil then
  259. c = Instance.new("WedgePart",m)
  260. else
  261. c = Instance.new("Part",m)
  262. end
  263. c.TopSurface,c.BottomSurface = 0,0
  264. c.Locked = true
  265. c.formFactor = "Custom"
  266. c.Size = Vector3.new(x,y,z)
  267. if color ~= "random" then
  268. c.BrickColor = BrickColor.new(color)
  269. else
  270. c.BrickColor = BrickColor:random()
  271. end
  272. c.Transparency = transparency
  273. c.CanCollide = cancollide
  274. if anchored ~= nil then
  275. c.Anchored = anchored
  276. end
  277. if parent ~= nil then
  278. c.Parent = parent
  279. end
  280. return c
  281. end
  282.  
  283. function We(part0,part1,x,y,z,rx,ry,rz,parent)
  284. w = Instance.new("Motor",m)
  285. if parent ~= nil then w.Parent = parent end
  286. w.Part0,w.Part1 = part0,part1
  287. w.C1 = CFrame.new(x,y,z) * CFrame.Angles(rx,ry,rz)
  288. return w
  289. end
  290.  
  291. function SetAnimation(id,humanoid)
  292. if Animating ~= nil then
  293. Animating:Stop()
  294. end
  295. Animate.AnimationId = Asset .. id
  296. Animating = humanoid:LoadAnimation(Animate)
  297. Animating:Play()
  298. end
  299.  
  300. function AnimationStop()
  301. jerk = false
  302. party = false
  303. canttouch = false
  304. happy = false
  305. spin = false
  306. thriller = false
  307. barrel = false
  308. sax = false
  309. spooky = false
  310. stride = false
  311. shuffle = false
  312. rock = false
  313. gagnam = false
  314. snoop = false
  315. darude = false
  316. taco = false
  317. if barrelbrick ~= nil then
  318. barrelbrick:Remove()
  319. barrelbrick = nil
  320. end
  321. if saxtool ~= nil then
  322. saxtool:Remove()
  323. saxtool = nil
  324. end
  325. if sandstorm ~= nil then
  326. sandstorm:Remove()
  327. sandstorm = nil
  328. end
  329. end
  330.  
  331. local Musical
  332. function SetMusic(id,volume)
  333. Musical = Instance.new("Sound",char.Head)
  334. if volume == nil then
  335. Musical.Volume = 1
  336. else
  337. Musical.Volume = volume
  338. end
  339. Musical.Looped = true
  340. Musical.SoundId = Asset .. id
  341. return Musical
  342. end
  343.  
  344. function GenerateGui()
  345. a=Instance.new("ScreenGui")
  346. a.Name = "KrystalDance By KrystalTeam"
  347. b=Instance.new("ImageLabel",a)
  348. b.BackgroundTransparency = 1
  349. b.Size = UDim2.new(0,250,0,100)
  350. b.Position = UDim2.new(0,0,1,0)
  351. b.Image = Asset .. "269467798"
  352. b.Name = "Logo"
  353. c=Instance.new("Sound",a)
  354. c.Name = "Intro"
  355. c.Volume = 1
  356. c.SoundId = Asset .. "236146895"
  357. c.Looped = false
  358. return a
  359. end
  360.  
  361. function Generate(player)
  362. char = player.Character
  363. Hat1 = P(1,1,1,'Black',0,false,false)
  364. Hat2 = P(1,1,1,'Black',0,false,false)
  365. wait()
  366. a=fm(Hat1,1577360,1,1,1,1577349) a.VertexColor = Vector3.new(1,1,1)
  367. b=fm(Hat2,13640868,1,1,1,18987684) b.VertexColor = Vector3.new(1,1,1)
  368. wait()
  369. if char:FindFirstChild("Head") then
  370. We(Hat1,char.Head,0,0.25,-0.135,0,0,0)
  371. We(Hat2,char.Head,0,0.8,0,0,0,0)
  372. if char.head:FindFirstChild("face") ~= nil then
  373. face = char.head:FindFirstChild("face")
  374. face.Texture = "rbxasset://textures/face.png"
  375. end
  376. c=char.Head:clone()
  377. c.Name = "FalseHead"
  378. c.CanCollide = false
  379. c.Parent = char
  380. We(c,char.Head,0,0,0,0,0,0)
  381. char.Head.Transparency = 1
  382. for i,v in pairs(char:GetChildren()) do
  383. if v.ClassName == "Shirt" or v.ClassName == "Pants" or v.ClassName == "Hat" or v.ClassName == "CharacterMesh" or v.ClassName == "Shirt Graphic" then
  384. v:Remove()
  385. end
  386. if v.ClassName == "BodyColors" then
  387. v.HeadColor = BrickColor.new("White")
  388. v.LeftArmColor = BrickColor.new("Really black")
  389. v.LeftLegColor = BrickColor.new("Really black")
  390. v.RightArmColor = BrickColor.new("Really black")
  391. v.RightLegColor = BrickColor.new("Really black")
  392. v.TorsoColor = BrickColor.new("Really black")
  393. end
  394. if v.ClassName == "Part" then
  395. if v.Name == "Head" or v.Name == "FalseHead" then
  396. v.BrickColor = BrickColor.new("White")
  397. else
  398. v.BrickColor = BrickColor.new("Really black")
  399. end
  400. end
  401. end
  402. ----------musics---------------
  403. M1=SetMusic(168007346)
  404. M2=SetMusic(144901116)
  405. M3=SetMusic(168570436)
  406. M4=SetMusic(142435409)
  407. M5=SetMusic(131525189)
  408. M6=SetMusic(133196268)
  409. M7=SetMusic(130791919)
  410. M8=SetMusic(130794684)
  411. M9=SetMusic(155313239)
  412. M10=SetMusic(158036870)
  413. M11=SetMusic(145262991)
  414. M12=SetMusic(151430448)
  415. M13=SetMusic(130844430)
  416. M14=SetMusic(172388329)
  417. M15=SetMusic(179534184)
  418. M16=SetMusic(142295308)
  419. -------------------------------
  420.  
  421. if char:FindFirstChild("HumanoidRootPart") ~= nil then
  422. rootpart = char:FindFirstChild("HumanoidRootPart")
  423. end
  424. if showtag == true then
  425. local bbg = Instance.new("BillboardGui",c)
  426. bbg.Adornee = c
  427. bbg.Name = "satuttava"
  428. bbg.Size = UDim2.new(6,0,2,0)
  429. bbg.StudsOffset = Vector3.new(0,2,0)
  430. local box = Instance.new("TextLabel",bbg)
  431. box.Size = UDim2.new(1,0,1,0)
  432. box.BackgroundColor = BrickColor.new("White")
  433. box.TextColor3 = Color3.new(255,0,0)
  434. box.TextStrokeTransparency = 0.5
  435. box.Font = 3
  436. box.Text = Player.Name
  437. box.BackgroundTransparency = 1
  438. box.Position = UDim2.new(0,0,0,0)
  439. box.TextScaled = true
  440. end
  441. if char:FindFirstChild("Humanoid") ~= nil then
  442. char:FindFirstChild("Humanoid").MaxHealth = (100*100*100*100)*100
  443. wait()
  444. char:FindFirstChild("Humanoid").Health = char:FindFirstChild("Humanoid").MaxHealth
  445. --char:FindFirstChild("Humanoid").Name = game.Players.LocalPlayer.Name
  446. humanoid = char:FindFirstChild("Humanoid")
  447. if humanoid:FindFirstChild("Animator") ~= nil then
  448. humanoid:FindFirstChild("Animator"):Remove()
  449. --Instance.new("Animator",humanoid)
  450. end
  451. if char:FindFirstChild("Animate") ~= nil then
  452. char:FindFirstChild("Animate"):Remove()
  453. end
  454. end
  455. Mouse = player:GetMouse()
  456. Music = Instance.new("Sound",char.Head)
  457. Music.Volume = 1
  458. Music.Looped = true
  459. Music.SoundId = Asset
  460. Animate = Instance.new("Animation",char.Head)
  461. Animate.AnimationId = Asset
  462.  
  463.  
  464.  
  465. head = char:FindFirstChild("Head")
  466. torso = char:FindFirstChild("Torso")
  467. ra = char:findFirstChild("Right Arm")
  468. la = char:findFirstChild("Left Arm")
  469. rl = char:findFirstChild("Right Leg")
  470. ll = char:findFirstChild("Left Leg")
  471. rs = torso:findFirstChild("Right Shoulder")
  472. ls = torso:findFirstChild("Left Shoulder")
  473. rh = torso:findFirstChild("Right Hip")
  474. lh = torso:findFirstChild("Left Hip")
  475. neck = torso:findFirstChild("Neck")
  476. rj = char:findFirstChild("HumanoidRootPart"):findFirstChild("RootJoint")
  477.  
  478. state = humanoid:GetState()
  479. local ca = nil
  480. ca=GenerateGui()
  481. ca.Parent = player.PlayerGui
  482. if ca:FindFirstChild("Logo") ~= nil then
  483. ca:FindFirstChild("Logo"):TweenPosition(UDim2.new(0, 0, 1, -100), "Out", "Quad", 3, true)
  484. if ca:FindFirstChild("Intro") ~= nil then
  485. ca:FindFirstChild("Intro"):Play()
  486. coroutine.resume(coroutine.create(function()
  487. for i=0,30 do
  488. ca:FindFirstChild("Intro").Volume = 1/(i/2)
  489. wait(0.5)
  490. if i >= 30 then
  491. break
  492. end
  493. end
  494. end))
  495. end
  496. end
  497.  
  498. if humanoid ~= nil then
  499. humanoid.Changed:connect(function(pro)
  500. if pro == "MoveDirection" or pro == "Jump" then
  501. if Music.IsPlaying == true then
  502. AnimationStop()
  503. end
  504. end
  505. end)
  506. humanoid.Died:connect(function()
  507. AnimationStop()
  508. end)
  509.  
  510. Mouse.KeyUp:connect(function(key)
  511. if key == "w" then
  512. W = false
  513. end
  514. if key == "a" then
  515. A = false
  516. end
  517. if key == "s" then
  518. S = false
  519. end
  520. if key == "d" then
  521. D = false
  522. end
  523. if string.byte(key) == 48 then
  524. run = false
  525. end
  526. end)
  527.  
  528. Mouse.KeyDown:connect(function(key)
  529. if key == "w" then
  530. W = true
  531. AnimationStop()
  532. end
  533. if key == "a" then
  534. A = true
  535. AnimationStop()
  536. end
  537. if key == "s" then
  538. S = true
  539. AnimationStop()
  540. end
  541. if key == "d" then
  542. D = true
  543. AnimationStop()
  544. end
  545. end)
  546.  
  547.  
  548.  
  549. Mouse.KeyDown:connect(function(key)
  550. KeyUsed(key)
  551. end)
  552. end
  553. end
  554. print'KrystalDance By: KrystalTeam as fully Loaded!'
  555. end
  556.  
  557. function KeyUsed(key)
  558. if humanoid ~= nil then
  559. if humanoid.Health > 0 then
  560. if string.byte(key) == 32 then
  561. jump = true
  562. AnimationStop()
  563. --sit = false
  564. end
  565. if string.byte(key) == 50 then
  566. AnimationStop()
  567. if sit == true then
  568. sit = false
  569. else
  570. sit = true
  571. end
  572. end
  573. if string.byte(key) == 48 then
  574. run = true
  575. end
  576. if W == false and A == false and S == false and D == false and jump == false and sit == false then
  577. if key == "Q" or key == "q" then
  578. AnimationStop()
  579. canttouch = true
  580. M1:Play()
  581. end
  582. if key == "E" or key == "e" then
  583. AnimationStop()
  584. party = true
  585. M2:Play()
  586. end
  587. if key == "R" or key == "r" then
  588. AnimationStop()
  589. jerk = true
  590. M3:Play()
  591. end
  592. if key == "T" or key == "t" then
  593. AnimationStop()
  594. happy = true
  595. M4:Play()
  596. end
  597. if key == "Y" or key == "y" then
  598. AnimationStop()
  599. spin = true
  600. M5:Play()
  601. end
  602. if key == "U" or key == "u" then
  603. AnimationStop()
  604. thriller = true
  605. M6:Play()
  606. end
  607. if key == "F" or key == "f" then
  608. AnimationStop()
  609. barrel = true
  610. M7:Play()
  611. if barrelbrick == nil and barrel == true then
  612. barrelbrick = P(2,2,1,'Black',0,false,false)
  613. a=fm(barrelbrick,29873142,1.1,0.8,1.1,31082268) a.VertexColor = Vector3.new(1,1,1)
  614. We(barrelbrick,char.Torso,0,-0.2,0,0,0,0)
  615. end
  616. end
  617. if key == "P" or key == "p" then
  618. AnimationStop()
  619. sax = true
  620. M8:Play()
  621. if saxtool == nil and sax == true then
  622. saxtool = P(1,2,2,'Black',0,false,false)
  623. a=fm(saxtool,44410178,1.5,1.5,1.5,44410320) a.VertexColor = Vector3.new(1,1,1)
  624. b=We(saxtool,char:FindFirstChild("Left Arm"),0,-1,0,0,0,0)
  625. b.C1 = CFrame.new(0.5, -0.9, -0.3) * CFrame.Angles(math.pi/1.5, -math.pi/2, -math.pi/8)
  626. end
  627. end
  628. if key == "G" or key == "g" then
  629. AnimationStop()
  630. spooky = true
  631. M9:Play()
  632. end
  633. if key == "H" or key == "h" then
  634. AnimationStop()
  635. stride = true
  636. M10:Play()
  637. end
  638. if key == "J" or key == "j" then
  639. AnimationStop()
  640. shuffle = true
  641. M11:Play()
  642. end
  643. if key == "K" or key == "k" then
  644. AnimationStop()
  645. rock = true
  646. M12:Play()
  647. end
  648. if key == "L" or key == "l" then
  649. AnimationStop()
  650. gagnam = true
  651. M13:Play()
  652. end
  653. if key == "Z" or key == "z" then
  654. AnimationStop()
  655. snoop = true
  656. M14:Play()
  657. end
  658. if key == "X" or key == "x" then
  659. AnimationStop()
  660. darude = true
  661. M15:Play()
  662. if sandstorm == nil and darude == true then
  663. sandstorm = P(1,1,1,'Black',0,false,false)
  664. sandstorm.Transparency = 1
  665. a=Instance.new("Smoke",sandstorm)
  666. a.Color = Color3.new(255/255,255/255,175/255)
  667. a.Size = 0.4
  668. a.RiseVelocity = 3
  669. a.Opacity = 0.75
  670. b=We(sandstorm,char:FindFirstChild("Torso"),0,0,0,0,0,0)
  671. b.C1 = CFrame.new(0, -2, 0)
  672. end
  673. end
  674. if key == "C" or key == "c" then
  675. AnimationStop()
  676. taco = true
  677. M16:Play()
  678. end
  679. end
  680. end
  681. end
  682. end
  683.  
  684. Generate(Player)
  685.  
  686. game:service'RunService'.Stepped:connect(function()
  687. count = (count % 100) + countspeed
  688. angle = math.pi * math.sin(math.pi*2/100*count)
  689. countspeed = 1
  690.  
  691. state = humanoid:GetState()
  692. if state ~= Enum.HumanoidStateType.Freefall then
  693. jump = false
  694. else
  695. jump = true
  696. sit = false
  697. AnimationStop()
  698. end
  699.  
  700. local mesh1anan = Instance.new("SpecialMesh")
  701. mesh1anan.MeshType = Enum.MeshType.FileMesh
  702. mesh1anan.Scale = Vector3.new(3,3,3)
  703. mesh1anan.MeshId = "http://www.roblox.com/asset/?id=14846869"
  704. mesh1anan.TextureId = "http://www.roblox.com/asset/?id=14846834"
  705. if taco == true then
  706. if char ~= nil then
  707. local locationanan = char:GetModelCFrame()
  708. local tacoa = Instance.new("Part")
  709. tacoa.CanCollide = false
  710. tacoa.RotVelocity = Vector3.new(math.random()*math.pi,math.random()*math.pi,math.random()*math.pi)
  711. local meshanananan = mesh1anan:clone()
  712. meshanananan.Parent = tacoa
  713. meshanananan.Scale = Vector3.new(math.random()*20,math.random()*20,math.random()*20)
  714. tacoa.CFrame = locationanan * CFrame.new(math.random()*500 - 250,math.random(100,200),math.random()*500 - 250)
  715. tacoa.Parent = workspace
  716. game:GetService("Debris"):AddItem(tacoa,4)
  717. end
  718. end
  719.  
  720.  
  721.  
  722.  
  723. if canttouch == false then
  724. M1:Stop()
  725. end
  726. if party == false then
  727. M2:Stop()
  728. end
  729. if jerk == false then
  730. M3:Stop()
  731. end
  732. if happy == false then
  733. M4:Stop()
  734. end
  735. if spin == false then
  736. M5:Stop()
  737. end
  738. if thriller == false then
  739. M6:Stop()
  740. end
  741. if barrel == false then
  742. M7:Stop()
  743. end
  744. if sax == false then
  745. M8:Stop()
  746. end
  747. if spooky == false then
  748. M9:Stop()
  749. end
  750. if stride == false then
  751. M10:Stop()
  752. end
  753. if shuffle == false then
  754. M11:Stop()
  755. end
  756. if rock == false then
  757. M12:Stop()
  758. end
  759. if gagnam == false then
  760. M13:Stop()
  761. end
  762. if snoop == false then
  763. M14:Stop()
  764. end
  765. if darude == false then
  766. M15:Stop()
  767. end
  768. if taco == false then
  769. M16:Stop()
  770. end
  771.  
  772. if run == true and sit == false then
  773. humanoid.WalkSpeed = 25
  774. elseif sit == true then
  775. humanoid.WalkSpeed = 0
  776. else
  777. humanoid.WalkSpeed = 16
  778. end
  779.  
  780. if global_wait == 380 then global_wait = 0 end
  781.  
  782. if (W == false or A == false or S == false or D == false) and jump == false and sit == false then
  783. ls.C1 = CFrame.new(0,0.5,-0.5) * CFrame.Angles(0, 0, 0 - angle/75)
  784. rs.C1 = CFrame.new(0,0.5,-0.5) * CFrame.Angles(0, 0, 0 - angle/75)
  785. lh.C1 = CFrame.new(0,1,0.5) * CFrame.Angles(0, 0, 0 + angle/75)
  786. rh.C1 = CFrame.new(0,1,0.5) * CFrame.Angles(0, 0, 0 + angle/75)
  787. neck.C1 = CFrame.new(0,-0.5,0) * CFrame.Angles(math.pi/2 + angle/75, math.pi, 0)
  788. rj.C0 = CFrame.new(0, 0, 0) * CFrame.Angles(math.pi/2, math.pi, 0)
  789. end
  790.  
  791.  
  792. if (W == false or A == false or S == false or D == false) and jump == false and sit == true then
  793. local ray = Ray.new(torso.Position, Vector3.new(0, -3, 0))
  794. local hitz,enz = workspace:FindPartOnRay(ray, char)
  795. if hitz then
  796. if rootpart:FindFirstChild("Weld") == nil then
  797. miniweld = Instance.new("Weld", rootpart)
  798. miniweld.C0 = hitz.CFrame:toObjectSpace(rootpart.CFrame)
  799. miniweld.Part0 = hitz
  800. miniweld.Part1 = rootpart
  801. humanoid.PlatformStand = true
  802. end
  803. end
  804. else
  805. if rootpart:FindFirstChild("Weld") ~= nil then
  806. rootpart:FindFirstChild("Weld"):Destroy()
  807. humanoid.PlatformStand = false
  808. end
  809. end
  810.  
  811. if (W == false or A == false or S == false or D == false) and jump == false and sit == true then
  812. ls.C1 = CFrame.new(0,0.5,-0.5) * CFrame.Angles(0, 0, 0 - math.pi/15)
  813. rs.C1 = CFrame.new(0,0.5,-0.5) * CFrame.Angles(0, 0, 0 + math.pi/15)
  814. lh.C1 = CFrame.new(0,1,0.5) * CFrame.Angles(0 + math.pi/8, 0, math.pi/2 - math.pi/15)
  815. rh.C1 = CFrame.new(0,1,0.5) * CFrame.Angles(0 + math.pi/8, 0, -math.pi/2 + math.pi/15)
  816. neck.C1 = CFrame.new(0,-0.5,0) * CFrame.Angles(math.pi/2 + math.pi/15, math.pi, 0)
  817. rj.C0 = CFrame.new(0, -2, 0) * CFrame.Angles(math.pi/2 + math.pi/15, math.pi, 0)
  818. end
  819.  
  820. if jump == true and sit == false then
  821. countspeed = 2
  822. ls.C1 = CFrame.new(0,0.5,-0.5) * CFrame.Angles(0, 0, math.pi + angle/12)
  823. rs.C1 = CFrame.new(0,0.5,-0.5) * CFrame.Angles(0, 0, math.pi + angle/12)
  824. lh.C1 = CFrame.new(0,1,0.5) * CFrame.Angles(0, 0, 0 + angle/12)
  825. rh.C1 = CFrame.new(0,1,0.5) * CFrame.Angles(0, 0, 0 + angle/12)
  826. neck.C1 = CFrame.new(0,-0.5,0) * CFrame.Angles(math.pi/2 + angle/25, math.pi, 0)
  827. rj.C0 = CFrame.new(0, 0, 0) * CFrame.Angles(math.pi/2+ angle/50, math.pi, 0)
  828. end
  829.  
  830. if (W == true or A == true or S == true or D == true) and jump == false and sit == false then
  831. if run == true then
  832. countspeed = 4
  833. ls.C1 = CFrame.new(0,0.5,-0.5) * CFrame.Angles(0, 0, 0 - angle/3)
  834. rs.C1 = CFrame.new(0,0.5,-0.5) * CFrame.Angles(0, 0, 0 - angle/3)
  835. lh.C1 = CFrame.new(0,1,0.5) * CFrame.Angles(0, 0, 0 + angle/5)
  836. rh.C1 = CFrame.new(0,1,0.5) * CFrame.Angles(0, 0, 0 + angle/5)
  837. neck.C1 = CFrame.new(0,-0.5,0) * CFrame.Angles(math.pi/2 + angle/20, math.pi, 0)
  838. rj.C0 = CFrame.new(0, 0, 0) * CFrame.Angles(math.pi/2 + angle/40, math.pi, 0)
  839. else
  840. countspeed = 2
  841. ls.C1 = CFrame.new(0,0.5,-0.5) * CFrame.Angles(0, 0, 0 - angle/4)
  842. rs.C1 = CFrame.new(0,0.5,-0.5) * CFrame.Angles(0, 0, 0 - angle/4)
  843. lh.C1 = CFrame.new(0,1,0.5) * CFrame.Angles(0, 0, 0 + angle/6)
  844. rh.C1 = CFrame.new(0,1,0.5) * CFrame.Angles(0, 0, 0 + angle/6)
  845. neck.C1 = CFrame.new(0,-0.5,0) * CFrame.Angles(math.pi/2 + angle/25, math.pi, 0)
  846. rj.C0 = CFrame.new(0, 0, 0) * CFrame.Angles(math.pi/2+ angle/50, math.pi, 0)
  847. end
  848. end
  849.  
  850. if W == false and A == false and S == false and D == false and jump == false and sit == false then
  851. if jerk == true and jump == false and sit == false then
  852. countspeed = 2
  853. ls.C1 = CFrame.new(0,0.5,-0.5) * CFrame.Angles(angle/5, 0, angle/4)
  854. rs.C1 = CFrame.new(0,0.5,-0.5) * CFrame.Angles(angle/5, 0, -angle/4)
  855. lh.C1 = CFrame.new(0,1,0.5) * CFrame.Angles(angle/10, 0, angle/5)-- * CFrame.Angles(angle*0.5, 0, -math.abs(angle*0.15))
  856. rh.C1 = CFrame.new(0,1,0.5) * CFrame.Angles(angle/10, 0, angle/5)-- * CFrame.Angles(-angle*0.5, 0, math.abs(angle*0.15))
  857. neck.C1 = CFrame.new(0,-0.5,0) * CFrame.Angles(math.pi/2 + angle/5, math.pi, 0)
  858. rj.C0 = CFrame.new(0, 0, 0) * CFrame.Angles(math.pi/2 + angle/5, math.pi, 0)
  859. elseif party == true and jump == false and sit == false then
  860. countspeed = 4
  861. lh.C1 = CFrame.new(0,1,0.5) * CFrame.Angles(angle/15, 0, angle/15)
  862. rh.C1 = CFrame.new(0,1,0.5) * CFrame.Angles(angle/15, 0, angle/15)
  863. ls.C1 = CFrame.new(0.25,0.5 + 1 * angle/10,0.5) * CFrame.Angles(math.pi + angle/10, 0, 0 + angle/10)
  864. rs.C1 = CFrame.new(-0.25,0.5 + 1 * angle/10,0.5) * CFrame.Angles(math.pi + angle/10, 0, 0 + angle/10)
  865. neck.C1 = CFrame.new(0,-0.5,0) * CFrame.Angles(math.pi/2 + angle/10, math.pi, 0)
  866. rj.C0 = CFrame.new(0, 0.5 + angle/5, 0) * CFrame.Angles(math.pi/2, math.pi, 0)
  867. elseif canttouch == true and jump == false and sit == false then
  868. countspeed = 2
  869. ls.C1 = CFrame.new(0,0.5,-0.5) * CFrame.Angles(0 + angle/8, 0, math.pi/12 + angle/12)
  870. rs.C1 = CFrame.new(0,0.5,-0.5) * CFrame.Angles(0 + angle/8, 0, -math.pi/12 - angle/12)
  871. lh.C1 = CFrame.new(0.35,0.7,0.5) * CFrame.Angles(0 + angle/10, 0, -math.pi/8)
  872. rh.C1 = CFrame.new(-0.35,0.7,0.5) * CFrame.Angles(0 + angle/10, 0, math.pi/8)
  873. neck.C1 = CFrame.new(0,-0.5,0) * CFrame.Angles(math.pi/2 + angle/15, math.pi, 0)
  874. rj.C0 = CFrame.new(angle/4, -0.3 + angle/20, 0) * CFrame.Angles(math.pi/2, math.pi, 0)
  875. elseif happy == true and jump == false and sit == false then
  876. countspeed = 4
  877. ls.C1 = CFrame.new(0,0.5,-0.5) * CFrame.Angles(math.pi/4, math.pi/8 + angle/8, math.pi/4 + angle/8)
  878. rs.C1 = CFrame.new(0,0.5,-0.5) * CFrame.Angles(math.pi/4, -math.pi/8 + angle/8, -math.pi/4 + angle/8)
  879. lh.C1 = CFrame.new(0,1,0.5) * CFrame.Angles(0 + angle/10, 0, 0 + angle/10)
  880. rh.C1 = CFrame.new(0,1,0.5) * CFrame.Angles(0 + angle/10, 0, 0 + angle/10)
  881. neck.C1 = CFrame.new(0,-0.5,0) * CFrame.Angles(math.pi/2 + angle/15, math.pi + angle/15, 0 + angle/15)
  882. rj.C0 = CFrame.new(0, 0 + angle/20, 0) * CFrame.Angles(math.pi/2, math.pi, 0)
  883. elseif spin == true and jump == false and sit == false then
  884. global_wait = (global_wait % 360) + 4
  885. countspeed = 4
  886. ls.C1 = CFrame.new(0,1,0) * CFrame.Angles(math.pi/2, 0 + angle/10, 0 + angle/10)
  887. rs.C1 = CFrame.new(0,1,0) * CFrame.Angles(math.pi/2, 0 - angle/10, 0 + angle/10)
  888. lh.C1 = CFrame.new(0,1,0.5) * CFrame.Angles(0 + angle/10, 0 + angle/10, 0 + angle/10)
  889. rh.C1 = CFrame.new(0,1,0.5) * CFrame.Angles(0 + angle/10, 0 + angle/10, 0 + angle/10)
  890. neck.C1 = CFrame.new(0,-0.5,0) * CFrame.Angles(math.pi/2, math.pi, 0)
  891. rj.C0 = CFrame.new(0 + angle/25, 0, 0 - angle/25) * CFrame.Angles(math.pi/2, math.pi, math.rad(global_wait*4))
  892. elseif thriller == true and jump == false and sit == false then
  893. countspeed = 2
  894. ls.C1 = CFrame.new(0,0.5,-0.5) * CFrame.Angles(0, 0, math.pi/2 + angle/15)
  895. rs.C1 = CFrame.new(0,0.5,-0.5) * CFrame.Angles(0, 0, -math.pi/2 + angle/15)
  896. lh.C1 = CFrame.new(0,1,0.5) * CFrame.Angles(math.pi/60 - angle/45, 0, 0 + angle/15)
  897. rh.C1 = CFrame.new(0,1,0.5) * CFrame.Angles(math.pi/60 + angle/45, 0, 0 + angle/15)
  898. neck.C1 = CFrame.new(0,-0.5,0) * CFrame.Angles(math.pi/2 + angle/15, math.pi + angle/10, 0)
  899. rj.C0 = CFrame.new(0, 0, 0) * CFrame.Angles(math.pi/2 + angle/50 , math.pi + angle/50, 0 + angle/50)
  900. elseif barrel == true and jump == false and sit == false then
  901. ls.C1 = CFrame.new(0,0.5,-0.5) * CFrame.Angles(0, 0, math.pi)
  902. rs.C1 = CFrame.new(0,0.5,-0.5) * CFrame.Angles(0, 0, math.pi)
  903. lh.C1 = CFrame.new(0,1,0.5) * CFrame.Angles(0, 0, 0)
  904. rh.C1 = CFrame.new(0,1,0.5) * CFrame.Angles(0, 0, 0)
  905. neck.C1 = CFrame.new(0,-0.5,0) * CFrame.Angles(math.pi/2, math.pi, 0)
  906. rj.C0 = CFrame.new(0 + angle, -1.8, 0) * CFrame.Angles(0, math.pi, 0 + angle)
  907. elseif sax == true and jump == false and sit == false then
  908. countspeed = 2
  909. ls.C1 = CFrame.new(0,0.75,-0.25) * CFrame.Angles(-math.pi/5, 0, math.pi/2 - math.abs(angle/30))
  910. rs.C1 = CFrame.new(0,0.75,-0.25) * CFrame.Angles(-math.pi/5, 0, -math.pi/2 + math.abs(angle/30))
  911. lh.C1 = CFrame.new(0,1,0.5) * CFrame.Angles(0, 0, 0 - math.abs(angle/30))
  912. rh.C1 = CFrame.new(0,1,0.5) * CFrame.Angles(0, 0, 0 + math.abs(angle/30))
  913. neck.C1 = CFrame.new(0,-0.5,0) * CFrame.Angles(math.pi/2, math.pi, 0)
  914. rj.C0 = CFrame.new(0, -math.abs(angle*0.05), math.abs(angle*0.025)) * CFrame.Angles(math.pi/2 + math.abs(angle/20), math.pi, 0)
  915. elseif spooky == true and jump == false and sit == false then
  916. countspeed = 3
  917. ls.C1 = CFrame.new(0,0.5,-0.5) * CFrame.Angles(0, 0, math.pi/2 - angle/1.5)
  918. rs.C1 = CFrame.new(0,0.5,-0.5) * CFrame.Angles(0, 0, -math.pi/2 + angle/1.5)
  919. lh.C1 = CFrame.new(0,1,0.5) * CFrame.Angles(0, 0, 0 - angle/16)
  920. rh.C1 = CFrame.new(0,1,0.5) * CFrame.Angles(0, 0, 0 + angle/16)
  921. neck.C1 = CFrame.new(0,-0.5,0) * CFrame.Angles(math.pi/2 + angle/12, math.pi, 0)
  922. rj.C0 = CFrame.new(0, 0 + angle / 35, 0) * CFrame.Angles(math.pi/2 + angle/25, math.pi, 0)
  923. elseif stride == true and jump == false and sit == false then
  924. countspeed = 2.5
  925. ls.C1 = CFrame.new(0,0.5,-0.5) * CFrame.Angles(angle/16, angle/16,math.pi/3.5 + angle/8)
  926. rs.C1 = CFrame.new(0,0.5,-0.5) * CFrame.Angles(angle/16, -angle/16,-math.pi/1.5 + -angle/8)
  927. lh.C1 = CFrame.new(0,1,0.5) * CFrame.Angles(0, angle/16, angle/16)
  928. rh.C1 = CFrame.new(0,1,0.5) * CFrame.Angles(0, angle/16, angle/16)
  929. neck.C1 = CFrame.new(0,-0.5,0) * CFrame.Angles(math.pi/2, math.pi, 0)
  930. rj.C0 = CFrame.new(0, 0, 0) * CFrame.Angles(math.pi/2-angle/16, math.pi, 0)
  931. elseif shuffle == true and jump == false and sit == false then
  932. countspeed = 2
  933. ls.C1 = CFrame.new(0,0.75,-0.35) * CFrame.Angles(math.pi/8, 0, math.pi/2 + angle/3.5)
  934. rs.C1 = CFrame.new(0,0.75,-0.35) * CFrame.Angles(math.pi/8, 0, -math.pi/2 + angle/3.5)
  935. lh.C1 = CFrame.new(0 + angle/50,1,0.5) * CFrame.Angles(0, 0 + angle/35, 0 + angle/15)
  936. rh.C1 = CFrame.new(0 + angle/50,1,0.5) * CFrame.Angles(0, 0 + angle/35, 0 + angle/15)
  937. neck.C1 = CFrame.new(0,-0.5,0) * CFrame.Angles(math.pi/2 + angle/15, math.pi, 0)
  938. rj.C0 = CFrame.new(0, 0, 0) * CFrame.Angles(math.pi/2 - angle/35, math.pi - angle/35, 0)
  939. elseif rock == true and jump == false and sit == false then
  940. countspeed = 4
  941. ls.C1 = CFrame.new(0,0.5,-0.5) * CFrame.Angles(0, 0, math.pi/2+angle/2)
  942. rs.C1 = CFrame.new(0,0.5,-0.5) * CFrame.Angles(0, 0, -math.pi/2+angle/2)
  943. lh.C1 = CFrame.new(0,1,0.5) * CFrame.Angles(0+angle/32, 0, 0+angle/32)
  944. rh.C1 = CFrame.new(0,1,0.5) * CFrame.Angles(0+angle/32, 0, 0-angle/32)
  945. neck.C1 = CFrame.new(0,-0.5,0) * CFrame.Angles(math.pi/2, math.pi, 0)
  946. rj.C0 = CFrame.new(0, 0 - angle/50, 0) * CFrame.Angles(math.pi/2, math.pi, 0)
  947. elseif gagnam == true and jump == false and sit == false then
  948. countspeed = 4
  949. ls.C1 = CFrame.new(0,0.75,-0.15) * CFrame.Angles(-math.pi/4, 0, (math.pi/2 + angle/14) - math.pi/20)
  950. rs.C1 = CFrame.new(0,0.75,-0.15) * CFrame.Angles(-math.pi/4, 0, (-math.pi/2 - angle/14) + math.pi/20)
  951. lh.C1 = CFrame.new(0,1,0.5) * CFrame.Angles(0 + angle/16, 0, 0)
  952. rh.C1 = CFrame.new(0,1,0.5) * CFrame.Angles(0 + angle/16, 0, 0)
  953. neck.C1 = CFrame.new(0,-0.5,0) * CFrame.Angles(math.pi/2 + angle/20, math.pi, 0)
  954. rj.C0 = CFrame.new(0, 0 + angle/40, 0) * CFrame.Angles(math.pi/2, math.pi, 0)
  955. elseif snoop == true and jump == false and sit == false then
  956. countspeed = 2
  957. ls.C1 = CFrame.new(0,0.5,-0.5) * CFrame.Angles(math.pi/12, 0, math.pi/4 + angle/4)
  958. rs.C1 = CFrame.new(0,0.5,-0.5) * CFrame.Angles(math.pi/12, 0, -math.pi/4 + angle/4)
  959. lh.C1 = CFrame.new(0,1,0.5) * CFrame.Angles(math.pi/24, 0, 0 + angle/4)
  960. rh.C1 = CFrame.new(0,1,0.5) * CFrame.Angles(math.pi/24, 0, 0 + angle/4)
  961. neck.C1 = CFrame.new(0,-0.5,0) * CFrame.Angles(math.pi/2 - angle/8, math.pi, 0)
  962. rj.C0 = CFrame.new(0, 0 + angle/48, 0) * CFrame.Angles(math.pi/2 + angle/24, math.pi, 0)
  963. elseif darude == true and jump == false and sit == false then
  964. countspeed = 3
  965. ls.C1 = CFrame.new(0,0.5,-0.5) * CFrame.Angles(0, 0, 0 + angle/1.5)
  966. rs.C1 = CFrame.new(0,0.5,-0.5) * CFrame.Angles(0, 0, 0 + angle/3)
  967. lh.C1 = CFrame.new(0,1,0.5) * CFrame.Angles(0, 0, 0 - angle/3)
  968. rh.C1 = CFrame.new(0,1,0.5) * CFrame.Angles(0, 0, 0 - angle/1.5)
  969. neck.C1 = CFrame.new(0,-0.5,0) * CFrame.Angles(math.pi/2, math.pi, 0)
  970. rj.C0 = CFrame.new(0, 0+ angle/45, 0) * CFrame.Angles(math.pi/2 - angle/6, math.pi, 0)
  971. elseif taco == true and jump == false and sit == false then
  972. countspeed = 4
  973. global_wait = (global_wait % 360) + 4
  974. ls.C1 = CFrame.new(0,1,-0.25) * CFrame.Angles(math.pi/6 + angle/12, 0, math.pi)
  975. rs.C1 = CFrame.new(0,1,-0.25) * CFrame.Angles(math.pi/6 + angle/12, 0, math.pi)
  976. lh.C1 = CFrame.new(0,1,0.5) * CFrame.Angles(0, 0, math.pi/8 + angle/16)
  977. rh.C1 = CFrame.new(0,1,0.5) * CFrame.Angles(0, 0, math.pi/8 + angle/16)
  978. neck.C1 = CFrame.new(0,-0.5,0) * CFrame.Angles(math.pi/2 - math.pi/8 + angle/16, math.pi, 0)
  979. rj.C0 = CFrame.new(0, 0.25 + angle/12, 0) * CFrame.Angles(math.pi/2, math.pi, math.rad(global_wait*4))
  980. end
  981. end
  982. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement