Advertisement
memesbruh03

krystaldance mlg2 edit new version

Sep 13th, 2016
432
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 28.79 KB | None | 0 0
  1. --[[
  2.    
  3.     KrystalDance: MLG edit No. 2 by adchand2
  4.     credit to everyone...
  5.  
  6.                                             ]]
  7.  
  8. wait(0)
  9. Player = game.Players.LocalPlayer
  10.  
  11. local count = 0
  12. local countspeed = 1
  13. local sine = 0
  14. local sinespeed = 1
  15. local angle = nil
  16. local global_wait = 0
  17. local showtag = true
  18.  
  19.  
  20. --dance booleans--
  21. local jerk = false
  22. local party = false
  23. local canttouch = false
  24. local happy = false
  25. local spin = false
  26. local thriller = false
  27. local barrel = false
  28. local sax = false
  29. local spooky = false
  30. local stride = false
  31. local shuffle = false
  32. local rock = false
  33. local gagnam = false
  34. local snoop = false
  35. local darude = false
  36. local taco = false
  37. ------------------
  38. --dance accessory--
  39. local barrelbrick = nil
  40. local saxtool = nil
  41. -------------------
  42. --custom animate--
  43. local walk = false
  44. local jump = false
  45. local sit = false
  46. local run = false
  47. ------------------
  48. --walk keys--
  49. local W = false
  50. local A = false
  51. local S = false
  52. local D = false
  53. -------------
  54. local m = Instance.new("Model",game.Players.LocalPlayer.Character) m.Name = "ModelParts"
  55. local miniweld = nil
  56. local rootpart = nil
  57.  
  58. local Mouse = nil
  59. local Animate = nil
  60. local Music = nil
  61. local Asset = "http://www.roblox.com/asset/?id="
  62. local Animating = nil
  63. local humanoid = nil
  64. local face = nil
  65.  
  66. local head = nil
  67. local torso = nil
  68. local ra = nil
  69. local la = nil
  70. local rl = nil
  71. local ll = nil
  72. local rs = nil
  73. local ls = nil
  74. local rh = nil
  75. local lh = nil
  76. local neck = nil
  77. local rj = nil
  78.  
  79. local char = nil
  80. local Hat1 = nil
  81. local Hat2 = nil
  82. local a,b = nil
  83.  
  84. ----------musics-----------------
  85. local M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12,M13,M14,M15,M16 = nil
  86. ---------------------------------
  87.  
  88. local mesh,meshids,textureids,w
  89.  
  90. function fm(parent,meshid,x,y,z,meshtexture)
  91. if meshid == "cylinder" then
  92.     mesh = Instance.new("CylinderMesh",parent)
  93.     mesh.Scale = Vector3.new(x,y,z)
  94.     return mesh
  95. else
  96.     mesh = Instance.new("SpecialMesh",parent)
  97.     if meshid ~= "sphere" then
  98.         if type(meshid) == "number" then mesh.MeshId = "rbxassetid://"..meshid else
  99.             mesh.MeshId = "rbxassetid://"..meshids[meshid]
  100.         end
  101.     else mesh.MeshType = 3 end
  102.     mesh.Scale = Vector3.new(x,y,z)
  103.     if meshtexture ~= nil then
  104.         if type(meshtexture) == "number" then
  105.             mesh.TextureId = "rbxassetid://"..meshtexture
  106.         else
  107.             mesh.TextureId = "rbxassetid://"..textureids[meshtexture] end
  108.         end
  109.     return mesh
  110.     end
  111. end
  112.  
  113. function P(x,y,z,color,transparency,cancollide,anchored,parent,typee)
  114. if typee ~= nil then
  115.     c = Instance.new("WedgePart",m)
  116. else
  117.     c = Instance.new("Part",m)
  118. end
  119. c.TopSurface,c.BottomSurface = 0,0
  120. c.Locked = true
  121. c.formFactor = "Custom"
  122. c.Size = Vector3.new(x,y,z)
  123. if color ~= "random" then
  124.     c.BrickColor = BrickColor.new(color)
  125. else
  126.     c.BrickColor = BrickColor:random()
  127. end
  128. c.Transparency = transparency
  129. c.CanCollide = cancollide
  130. if anchored ~= nil then
  131.     c.Anchored = anchored
  132. end
  133. if parent ~= nil then
  134.     c.Parent = parent
  135. end
  136. return c
  137. end
  138.  
  139. function We(part0,part1,x,y,z,rx,ry,rz,parent)
  140. w = Instance.new("Motor",m)
  141. if parent ~= nil then w.Parent = parent end
  142.     w.Part0,w.Part1 = part0,part1
  143.     w.C1 = CFrame.new(x,y,z) * CFrame.Angles(rx,ry,rz)
  144.     return w
  145. end
  146.  
  147. function SetAnimation(id,humanoid)
  148.     if Animating ~= nil then
  149.         Animating:Stop()
  150.     end
  151.     Animate.AnimationId = Asset .. id
  152.     Animating = humanoid:LoadAnimation(Animate)
  153.     Animating:Play()
  154. end
  155.  
  156. function AnimationStop()
  157.         jerk = false
  158.         party = false
  159.         canttouch = false
  160.         happy = false
  161.         spin = false
  162.         thriller = false
  163.         barrel = false
  164.         sax = false
  165.         spooky = false
  166.         stride = false
  167.         shuffle = false
  168.         rock = false
  169.         gagnam = false
  170.         snoop = false
  171.         darude = false
  172.         taco = false
  173.         if barrelbrick ~= nil then
  174.             barrelbrick:Remove()
  175.             barrelbrick = nil
  176.         end
  177.         if saxtool ~= nil then
  178.             saxtool:Remove()
  179.             saxtool = nil
  180.         end
  181.         if sandstorm ~= nil then
  182.             sandstorm:Remove()
  183.             sandstorm = nil
  184.         end
  185. end
  186.  
  187. local Musical
  188. function SetMusic(id,volume)
  189.     Musical = Instance.new("Sound",char.Head)
  190.     if volume == nil then
  191.         Musical.Volume = 1
  192.     else
  193.         Musical.Volume = volume
  194.     end
  195.     Musical.Looped = true
  196.     Musical.SoundId = Asset .. id
  197.     return Musical
  198. end
  199.  
  200. function GenerateGui()
  201.     a=Instance.new("ScreenGui")
  202.     a.Name = "KrystalDance By KrystalTeam - mlg2 edit by adchand2"
  203.     b=Instance.new("ImageLabel",a)
  204.     b.BackgroundTransparency = 1
  205.     b.Size = UDim2.new(0,250,0,100)
  206.     b.Position = UDim2.new(0,0,1,0)
  207.     b.Image = Asset .. "269467798"
  208.     b.Name = "Logo"
  209.     c=Instance.new("Sound",a)
  210.     c.Name = "Intro"
  211.     c.Volume = 1
  212.     c.SoundId = Asset .. "236146895"
  213.     c.Looped = false
  214.     d=Instance.new("TextLabel",b)
  215.     d.Size = UDim2.new(1,0,0,10)
  216.     d.BackgroundTransparency = 1
  217.     d.Text = "adchand2's MLG edit of:"
  218.     d.FontSize = Enum.FontSize.Size11
  219.     d.Font = Enum.Font.SourceSansLight
  220.     d.TextColor3 = Color3.fromRGB(255,255,255)
  221.     return a
  222. end
  223.  
  224. function Generate(player)
  225. char = player.Character
  226. Hat1 = P(1,1,1,'Black',0,false,false)
  227. Hat2 = P(1,1,1,'Black',0,false,false)
  228. wait()
  229. a=fm(Hat1,121910245,0.7,0.5,0.7,121947422) a.VertexColor = Vector3.new(1,1,1)
  230. b=fm(Hat2,13030731,0.95,0.95,0.95,13030735) b.VertexColor = Vector3.new(1,1,1)
  231. wait()
  232. if char:FindFirstChild("Head") then
  233.     We(Hat1,char.Head,0,0.25,-0.135,0,0,0)
  234.     We(Hat2,char.Head,0,0.8,0,0,0,0)
  235.     if char.head:FindFirstChild("face") ~= nil then
  236.         face = char.head:FindFirstChild("face")
  237.         face.Texture = "rbxassetid://318401263"
  238.     end
  239.     c=char.Head:clone()
  240.     c.Name = "FalseHead"
  241.     c.CanCollide = false
  242.     c.Parent = char
  243.     We(c,char.Head,0,0,0,0,0,0)
  244.     char.Head.Transparency = 1
  245.     for i,v in pairs(char:GetChildren()) do
  246.         if v.ClassName == "Shirt" or v.ClassName == "Pants" or v.ClassName == "Hat" or v.ClassName == "CharacterMesh" or v.ClassName == "Shirt Graphic" then
  247.             v:Remove()
  248.         end
  249.         if v.ClassName == "BodyColors" then
  250.             v.HeadColor = BrickColor.new("Cool yellow")
  251.             v.LeftArmColor = BrickColor.new("Cool yellow")
  252.             v.LeftLegColor = BrickColor.new("Bright blue")
  253.             v.RightArmColor = BrickColor.new("Cool yellow")
  254.             v.RightLegColor = BrickColor.new("Bright blue")
  255.             v.TorsoColor = BrickColor.new("Dark green")
  256.         end
  257.         if v.ClassName == "Part" then
  258.             if v.Name == "Head" or v.Name == "FalseHead" then
  259.                 v.BrickColor = BrickColor.new("Cool yellow")
  260.                 else
  261.                 v.BrickColor = BrickColor.new("Cool yellow")
  262.             end
  263.         end
  264.     end
  265. ----------musics---------------
  266.     M1=SetMusic(147164871) -- canttouch --> race_around_the_world
  267.     M2=SetMusic(401120618) -- party --> desiigner |-|
  268.     M3=SetMusic(257341751) -- jerk --> unity |-|
  269.     M4=SetMusic(130764066) -- happy --> ct1019_game |-|
  270.     M5=SetMusic(185492305) -- spin --> mlg_far |-|
  271.     M6=SetMusic(143562367) -- thriller --> _8_adven
  272.     M7=SetMusic(144363159) -- barrel --> SONIC_FASTER
  273.     M8=SetMusic(263941186) -- sax --> xxx_dorito_xxx
  274.     M9=SetMusic(142294604) -- spooky --> sail
  275.     M10=SetMusic(142375403) -- stride --> scary_monsters_nice_sprites_remix
  276.     M11=SetMusic(138086719) -- shuffle --> awesome_beat
  277.     M12=SetMusic(273648503) -- rock --> how_deep
  278.     M13=SetMusic(336581561) -- gagnam --> pootis_avi
  279.     M14=SetMusic(416308003) -- snoop --> loud tem
  280.     M15=SetMusic(130865948) -- sandstorm --> ultra
  281.     M16=SetMusic(263587241) -- taco --> loud_stuffs                 NOTE: |-| = changed
  282. -------------------------------
  283.    
  284.     if char:FindFirstChild("HumanoidRootPart") ~= nil then
  285.         rootpart = char:FindFirstChild("HumanoidRootPart")
  286.     end
  287.     if showtag == true then
  288.         local bbg = Instance.new("BillboardGui",c)
  289.         bbg.Adornee = c
  290.         bbg.Name = script.Parent.Name
  291.         bbg.Size = UDim2.new(6,0,2,0)
  292.         bbg.StudsOffset = Vector3.new(0,2,0)
  293.         local box = Instance.new("TextLabel",bbg)
  294.         box.Size = UDim2.new(1,0,1,0)
  295.         box.BackgroundColor = BrickColor.new("White")
  296.         box.TextColor3 = Color3.fromRGB(math.random(0,255),math.random(0,255),math.random(0,255))
  297.         box.TextStrokeTransparency = 0.5
  298.         box.Font = math.random(0,8)
  299.         box.Text = Player.Name
  300.         box.BackgroundTransparency = 0
  301.         box.BorderSizePixel = 0
  302.         box.Position = UDim2.new(0,0,0,0)
  303.         box.TextScaled = true
  304.     end
  305.     if char:FindFirstChild("Humanoid") ~= nil then
  306.         char:FindFirstChild("Humanoid").MaxHealth = (100*100*100*100)*100
  307.         wait()
  308.         char:FindFirstChild("Humanoid").Health = char:FindFirstChild("Humanoid").MaxHealth
  309.         --char:FindFirstChild("Humanoid").Name = game.Players.LocalPlayer.Name
  310.         humanoid = char:FindFirstChild("Humanoid")
  311.         if humanoid:FindFirstChild("Animator") ~= nil then
  312.             humanoid:FindFirstChild("Animator"):Remove()
  313.             --Instance.new("Animator",humanoid)
  314.         end
  315.         if char:FindFirstChild("Animate") ~= nil then
  316.             char:FindFirstChild("Animate"):Remove()
  317.         end
  318.     end
  319.     Mouse = player:GetMouse()
  320.     Music = Instance.new("Sound",char.Head)
  321.     Music.Volume = 1
  322.     Music.Looped = true
  323.     Music.SoundId = Asset
  324.     Animate = Instance.new("Animation",char.Head)
  325.     Animate.AnimationId = Asset
  326.    
  327.    
  328.    
  329.     head = char:FindFirstChild("Head")
  330.     torso = char:FindFirstChild("Torso")
  331.     ra = char:findFirstChild("Right Arm")
  332.     la = char:findFirstChild("Left Arm")
  333.     rl = char:findFirstChild("Right Leg")
  334.     ll = char:findFirstChild("Left Leg")
  335.     rs = torso:findFirstChild("Right Shoulder")
  336.     ls = torso:findFirstChild("Left Shoulder")
  337.     rh = torso:findFirstChild("Right Hip")
  338.     lh = torso:findFirstChild("Left Hip")
  339.     neck = torso:findFirstChild("Neck")
  340.     rj = char:findFirstChild("HumanoidRootPart"):findFirstChild("RootJoint")
  341.    
  342.     state = humanoid:GetState()
  343.     local ca = nil
  344.     ca=GenerateGui()
  345.     ca.Parent = player.PlayerGui
  346.     if ca:FindFirstChild("Logo") ~= nil then
  347.         ca:FindFirstChild("Logo"):TweenPosition(UDim2.new(0, 0, 1, -100), "Out", "Elastic", 3, true)
  348.         if ca:FindFirstChild("Intro") ~= nil then
  349.             ca:FindFirstChild("Intro"):Play()
  350.             coroutine.resume(coroutine.create(function()
  351.                 for i=0,30 do
  352.                     ca:FindFirstChild("Intro").Volume = 1/(i/2)
  353.                     wait(0.5)
  354.                     if i >= 30 then
  355.                         break
  356.                     end
  357.                 end
  358.             end))
  359.         end
  360.     end
  361.  
  362.     if humanoid ~= nil then
  363.         humanoid.Changed:connect(function(pro)
  364.             if pro == "MoveDirection" or pro == "Jump" then
  365.                 if Music.IsPlaying == true then
  366.                     AnimationStop()
  367.                 end
  368.             end
  369.         end)
  370.         humanoid.Died:connect(function()
  371.             AnimationStop()
  372.         end)
  373.        
  374.     Mouse.KeyUp:connect(function(key)
  375.         if key == "w" then
  376.             W = false
  377.         end
  378.         if key == "a" then
  379.             A = false
  380.         end
  381.         if key == "s" then
  382.             S = false
  383.         end
  384.         if key == "d" then
  385.             D = false
  386.         end
  387.         if string.byte(key) == 48 then
  388.             run = false
  389.         end
  390.     end)
  391.        
  392.     Mouse.KeyDown:connect(function(key)
  393.         if key == "w" then
  394.             W = true
  395.             AnimationStop()
  396.         end
  397.         if key == "a" then
  398.             A = true
  399.             AnimationStop()
  400.         end
  401.         if key == "s" then
  402.             S = true
  403.             AnimationStop()
  404.         end
  405.         if key == "d" then
  406.             D = true
  407.             AnimationStop()
  408.         end
  409.     end)
  410.    
  411.    
  412.    
  413.     Mouse.KeyDown:connect(function(key)
  414.         KeyUsed(key)
  415.     end)
  416. end
  417. end
  418. print'KrystalDance By: KrystalTeam (MLG EDIT) is fully Loaded!'
  419. end
  420.  
  421. function KeyUsed(key)
  422.         if humanoid ~= nil then
  423.             if humanoid.Health > 0 then
  424.                 if string.byte(key) == 32 then
  425.                     jump = true
  426.                     AnimationStop()
  427.                     --sit = false
  428.                 end
  429.                 if string.byte(key) == 50 then
  430.                     AnimationStop()
  431.                     if sit == true then
  432.                         sit = false
  433.                     else
  434.                         sit = true
  435.                     end
  436.                 end
  437.                 if string.byte(key) == 48 then
  438.                     run = true
  439.                 end
  440.                 if W == false and A == false and S == false and D == false and jump == false and sit == false then
  441.                     if key == "Q" or key == "q" then
  442.                         AnimationStop()
  443.                         canttouch = true
  444.                         M1:Play()
  445.                     end
  446.                     if key == "E" or key == "e" then
  447.                         AnimationStop()
  448.                         party = true
  449.                         M2:Play()
  450.                     end
  451.                     if key == "R" or key == "r" then
  452.                         AnimationStop()
  453.                         jerk = true
  454.                         M3:Play()
  455.                     end
  456.                     if key == "T" or key == "t" then
  457.                         AnimationStop()
  458.                         happy = true
  459.                         M4:Play()
  460.                     end
  461.                     if key == "Y" or key == "y" then
  462.                         AnimationStop()
  463.                         spin = true
  464.                         M5:Play()
  465.                     end
  466.                     if key == "U" or key == "u" then
  467.                         AnimationStop()
  468.                         thriller = true
  469.                         M6:Play()
  470.                     end
  471.                     if key == "F" or key == "f" then
  472.                         AnimationStop()
  473.                         barrel = true
  474.                         M7:Play()
  475.                         if barrelbrick == nil and barrel == true then
  476.                             barrelbrick = P(2,2,1,'Black',0,false,false)
  477.                             a=fm(barrelbrick,464515774,0.5,0.5,0.5,464515783) a.VertexColor = Vector3.new(1,1,1)
  478.                             We(barrelbrick,char.Torso,0,10,0,90,90,90)
  479.                         end
  480.                     end
  481.                     if key == "P" or key == "p" then
  482.                         AnimationStop()
  483.                         sax = true
  484.                         M8:Play()
  485.                         if saxtool == nil and sax == true then
  486.                             saxtool = P(1,2,2,'Black',0,false,false)
  487.                             a=fm(saxtool,44410178,1.5,1.5,1.5,44410320) a.VertexColor = Vector3.new(1,1,1)
  488.                             b=We(saxtool,char:FindFirstChild("Left Arm"),0,-1,0,0,0,0)
  489.                             b.C1 = CFrame.new(0.5, -0.9, -0.3) * CFrame.Angles(math.pi/1.5, -math.pi/2, -math.pi/8)
  490.                         end
  491.                     end
  492.                     if key == "G" or key == "g" then
  493.                         AnimationStop()
  494.                         spooky = true
  495.                         M9:Play()
  496.                     end
  497.                     if key == "H" or key == "h" then
  498.                         AnimationStop()
  499.                         stride = true
  500.                         M10:Play()
  501.                     end
  502.                     if key == "J" or key == "j" then
  503.                         AnimationStop()
  504.                         shuffle = true
  505.                         M11:Play()
  506.                     end
  507.                     if key == "K" or key == "k" then
  508.                         AnimationStop()
  509.                         rock = true
  510.                         M12:Play()
  511.                     end
  512.                     if key == "L" or key == "l" then
  513.                         AnimationStop()
  514.                         gagnam = true
  515.                         M13:Play()
  516.                     end
  517.                     if key == "Z" or key == "z" then
  518.                         AnimationStop()
  519.                         snoop = true
  520.                         M14:Play()
  521.                     end
  522.                     if key == "X" or key == "x" then
  523.                         AnimationStop()
  524.                         darude = true
  525.                         M15:Play()
  526.                         if sandstorm == nil and darude == true then
  527.                             sandstorm = P(1,1,1,'Black',0,false,false)
  528.                             sandstorm.Transparency = 1
  529.                             a=Instance.new("Smoke",sandstorm)
  530.                             a.Color = Color3.new(255/255,255/255,175/255)
  531.                             a.Size = 0.4
  532.                             a.RiseVelocity = 3
  533.                             a.Opacity = 0.75
  534.                             b=We(sandstorm,char:FindFirstChild("Torso"),0,0,0,0,0,0)
  535.                             b.C1 = CFrame.new(0, -2, 0)
  536.                         end
  537.                     end
  538.                     if key == "C" or key == "c" then
  539.                         AnimationStop()
  540.                         taco = true
  541.                         M16:Play()
  542.                     end
  543.                 end
  544.             end
  545.         end
  546. end
  547.  
  548. Generate(Player)
  549.  
  550. game:service'RunService'.Stepped:connect(function()
  551.     count = (count % 100) + countspeed
  552.     angle = math.pi * math.sin(math.pi*2/100*count)
  553.     countspeed = 1
  554.    
  555.     state = humanoid:GetState()
  556.     if state ~= Enum.HumanoidStateType.Freefall then
  557.         jump = false
  558.     else
  559.         jump = true
  560.         sit = false
  561.         AnimationStop()
  562.     end
  563.    
  564.     local mesh1anan = Instance.new("SpecialMesh")
  565.     mesh1anan.MeshType = Enum.MeshType.FileMesh
  566.     mesh1anan.Scale = Vector3.new(1,1,1)
  567.     mesh1anan.MeshId = "rbxassetid://431000837"
  568.     mesh1anan.TextureId = "rbxassetid://431000842"
  569.     if taco == true then
  570.         if char ~= nil then
  571.             local locationanan = char:GetModelCFrame()
  572.             local tacoa = Instance.new("Part")
  573.             tacoa.CanCollide = false
  574.             tacoa.RotVelocity = Vector3.new(math.random()*math.pi,math.random()*math.pi,math.random()*math.pi)
  575.             local meshanananan = mesh1anan:clone()
  576.             meshanananan.Parent = tacoa
  577.             meshanananan.Scale = Vector3.new(1,1,1)
  578.             tacoa.CFrame = locationanan * CFrame.new(math.random()*500 - 250,math.random(100,200),math.random()*500 - 250)
  579.             tacoa.Parent = workspace
  580.             game:GetService("Debris"):AddItem(tacoa,4)
  581.         end
  582.     end
  583.    
  584.    
  585.    
  586.    
  587.     if canttouch == false then 
  588.         M1:Stop()
  589.     end
  590.     if party == false then 
  591.         M2:Stop()
  592.     end
  593.     if jerk == false then  
  594.         M3:Stop()
  595.     end
  596.     if happy == false then 
  597.         M4:Stop()
  598.     end
  599.     if spin == false then  
  600.         M5:Stop()
  601.     end
  602.     if thriller == false then  
  603.         M6:Stop()
  604.     end
  605.     if barrel == false then
  606.         M7:Stop()
  607.     end
  608.     if sax == false then   
  609.         M8:Stop()
  610.     end
  611.     if spooky == false then
  612.         M9:Stop()
  613.     end
  614.     if stride == false then
  615.         M10:Stop()
  616.     end
  617.     if shuffle == false then   
  618.         M11:Stop()
  619.     end
  620.     if rock == false then
  621.         M12:Stop()
  622.     end
  623.     if gagnam == false then
  624.         M13:Stop()
  625.     end
  626.     if snoop == false then
  627.         M14:Stop() 
  628.     end
  629.     if darude == false then
  630.         M15:Stop()
  631.     end
  632.     if taco == false then
  633.         M16:Stop()
  634.     end
  635.    
  636.     if run == true and sit == false then
  637.         humanoid.WalkSpeed = 25
  638.     elseif sit == true then
  639.         humanoid.WalkSpeed = 0
  640.     else
  641.         humanoid.WalkSpeed = 16
  642.     end
  643.    
  644.     if global_wait == 380 then global_wait = 0 end
  645.    
  646.     if (W == false or A == false or S == false or D == false) and jump == false and sit == false then
  647.             ls.C1 = CFrame.new(0,0.5,-0.5) * CFrame.Angles(0, 0, 0 - angle/75)
  648.             rs.C1 = CFrame.new(0,0.5,-0.5) * CFrame.Angles(0, 0, 0 - angle/75)
  649.             lh.C1 = CFrame.new(0,1,0.5) * CFrame.Angles(0, 0, 0 + angle/75)
  650.             rh.C1 = CFrame.new(0,1,0.5) * CFrame.Angles(0, 0, 0 + angle/75)
  651.             neck.C1 = CFrame.new(0,-0.5,0) * CFrame.Angles(math.pi/2 + angle/75, math.pi, 0)
  652.             rj.C0 = CFrame.new(0, 0, 0) * CFrame.Angles(math.pi/2, math.pi, 0)
  653.     end
  654.    
  655.    
  656.     if (W == false or A == false or S == false or D == false) and jump == false and sit == true then
  657.         local ray = Ray.new(torso.Position, Vector3.new(0, -3, 0))
  658.         local hitz,enz = workspace:FindPartOnRay(ray, char)
  659.         if hitz then
  660.             if rootpart:FindFirstChild("Weld") == nil then
  661.                 miniweld = Instance.new("Weld", rootpart)
  662.                 miniweld.C0 = hitz.CFrame:toObjectSpace(rootpart.CFrame)
  663.                 miniweld.Part0 = hitz
  664.                 miniweld.Part1 = rootpart
  665.                 humanoid.PlatformStand = true
  666.             end
  667.         end
  668.     else
  669.         if rootpart:FindFirstChild("Weld") ~= nil then
  670.             rootpart:FindFirstChild("Weld"):Destroy()
  671.             humanoid.PlatformStand = false
  672.         end
  673.     end
  674.    
  675.     if (W == false or A == false or S == false or D == false) and jump == false and sit == true then
  676.         ls.C1 = CFrame.new(0,0.5,-0.5) * CFrame.Angles(0, 0, 0 - math.pi/15)
  677.         rs.C1 = CFrame.new(0,0.5,-0.5) * CFrame.Angles(0, 0, 0 + math.pi/15)
  678.         lh.C1 = CFrame.new(0,1,0.5) * CFrame.Angles(0 + math.pi/8, 0, math.pi/2 - math.pi/15)
  679.         rh.C1 = CFrame.new(0,1,0.5) * CFrame.Angles(0 + math.pi/8, 0, -math.pi/2 + math.pi/15)
  680.         neck.C1 = CFrame.new(0,-0.5,0) * CFrame.Angles(math.pi/2 + math.pi/15, math.pi, 0)
  681.         rj.C0 = CFrame.new(0, -2, 0) * CFrame.Angles(math.pi/2 + math.pi/15, math.pi, 0)
  682.     end
  683.    
  684.     if jump == true and sit == false then
  685.         countspeed = 2
  686.         ls.C1 = CFrame.new(0,0.5,-0.5) * CFrame.Angles(0, 0, math.pi + angle/12)
  687.         rs.C1 = CFrame.new(0,0.5,-0.5) * CFrame.Angles(0, 0, math.pi + angle/12)
  688.         lh.C1 = CFrame.new(0,1,0.5) * CFrame.Angles(0, 0, 0 + angle/12)
  689.         rh.C1 = CFrame.new(0,1,0.5) * CFrame.Angles(0, 0, 0 + angle/12)
  690.         neck.C1 = CFrame.new(0,-0.5,0) * CFrame.Angles(math.pi/2 + angle/25, math.pi, 0)
  691.         rj.C0 = CFrame.new(0, 0, 0) * CFrame.Angles(math.pi/2+ angle/50, math.pi, 0)
  692.     end
  693.    
  694.     if (W == true or A == true or S == true or D == true) and jump == false and sit == false then
  695.         if run == true then
  696.             countspeed = 4
  697.             ls.C1 = CFrame.new(0,0.5,-0.5) * CFrame.Angles(0, 0, 0 - angle/3)
  698.             rs.C1 = CFrame.new(0,0.5,-0.5) * CFrame.Angles(0, 0, 0 - angle/3)
  699.             lh.C1 = CFrame.new(0,1,0.5) * CFrame.Angles(0, 0, 0 + angle/5)
  700.             rh.C1 = CFrame.new(0,1,0.5) * CFrame.Angles(0, 0, 0 + angle/5)
  701.             neck.C1 = CFrame.new(0,-0.5,0) * CFrame.Angles(math.pi/2 + angle/20, math.pi, 0)
  702.             rj.C0 = CFrame.new(0, 0, 0) * CFrame.Angles(math.pi/2 + angle/40, math.pi, 0)
  703.         else
  704.             countspeed = 2
  705.             ls.C1 = CFrame.new(0,0.5,-0.5) * CFrame.Angles(0, 0, 0 - angle/4)
  706.             rs.C1 = CFrame.new(0,0.5,-0.5) * CFrame.Angles(0, 0, 0 - angle/4)
  707.             lh.C1 = CFrame.new(0,1,0.5) * CFrame.Angles(0, 0, 0 + angle/6)
  708.             rh.C1 = CFrame.new(0,1,0.5) * CFrame.Angles(0, 0, 0 + angle/6)
  709.             neck.C1 = CFrame.new(0,-0.5,0) * CFrame.Angles(math.pi/2 + angle/25, math.pi, 0)
  710.             rj.C0 = CFrame.new(0, 0, 0) * CFrame.Angles(math.pi/2+ angle/50, math.pi, 0)
  711.         end
  712.     end
  713.  
  714.     if W == false and A == false and S == false and D == false and jump == false and sit == false then
  715.         if jerk == true and jump == false and sit == false then
  716.             countspeed = 2
  717.             ls.C1 = CFrame.new(0,0.5,-0.5) * CFrame.Angles(angle/5, 0, angle/4)
  718.             rs.C1 = CFrame.new(0,0.5,-0.5) * CFrame.Angles(angle/5, 0, -angle/4)
  719.             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))
  720.             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))
  721.             neck.C1 = CFrame.new(0,-0.5,0) * CFrame.Angles(math.pi/2 + angle/5, math.pi, 0)
  722.             rj.C0 = CFrame.new(0, 0, 0) * CFrame.Angles(math.pi/2 + angle/5, math.pi, 0)
  723.         elseif party == true and jump == false and sit == false then
  724.             countspeed = 4
  725.             lh.C1 = CFrame.new(0,1,0.5) * CFrame.Angles(angle/15, 0, angle/15)
  726.             rh.C1 = CFrame.new(0,1,0.5) * CFrame.Angles(angle/15, 0, angle/15)
  727.             ls.C1 = CFrame.new(0.25,0.5 + 1 * angle/10,0.5) * CFrame.Angles(math.pi  + angle/10, 0, 0 + angle/10)
  728.             rs.C1 = CFrame.new(-0.25,0.5 + 1 * angle/10,0.5) * CFrame.Angles(math.pi  + angle/10, 0, 0  + angle/10)
  729.             neck.C1 = CFrame.new(0,-0.5,0) * CFrame.Angles(math.pi/2 + angle/10, math.pi, 0)
  730.             rj.C0 = CFrame.new(0, 0.5 + angle/5, 0) * CFrame.Angles(math.pi/2, math.pi, 0)
  731.         elseif canttouch == true and jump == false and sit == false then
  732.             countspeed = 2
  733.             ls.C1 = CFrame.new(0,0.5,-0.5) * CFrame.Angles(0 + angle/8, 0, math.pi/12 + angle/12)
  734.             rs.C1 = CFrame.new(0,0.5,-0.5) * CFrame.Angles(0 + angle/8, 0, -math.pi/12 - angle/12)
  735.             lh.C1 = CFrame.new(0.35,0.7,0.5) * CFrame.Angles(0 + angle/10, 0, -math.pi/8)
  736.             rh.C1 = CFrame.new(-0.35,0.7,0.5) * CFrame.Angles(0 + angle/10, 0, math.pi/8)
  737.             neck.C1 = CFrame.new(0,-0.5,0) * CFrame.Angles(math.pi/2 + angle/15, math.pi, 0)
  738.             rj.C0 = CFrame.new(angle/4, -0.3 + angle/20, 0) * CFrame.Angles(math.pi/2, math.pi, 0)
  739.         elseif happy == true and jump == false and sit == false then
  740.             countspeed = 4
  741.             ls.C1 = CFrame.new(0,0.5,-0.5) * CFrame.Angles(math.pi/4, math.pi/8 + angle/8, math.pi/4 + angle/8)
  742.             rs.C1 = CFrame.new(0,0.5,-0.5) * CFrame.Angles(math.pi/4, -math.pi/8 + angle/8, -math.pi/4 + angle/8)
  743.             lh.C1 = CFrame.new(0,1,0.5) * CFrame.Angles(0 + angle/10, 0, 0  + angle/10)
  744.             rh.C1 = CFrame.new(0,1,0.5) * CFrame.Angles(0 + angle/10, 0, 0  + angle/10)
  745.             neck.C1 = CFrame.new(0,-0.5,0) * CFrame.Angles(math.pi/2 + angle/15, math.pi + angle/15, 0 + angle/15)
  746.             rj.C0 = CFrame.new(0, 0 + angle/20, 0) * CFrame.Angles(math.pi/2, math.pi, 0)
  747.         elseif spin == true and jump == false and sit == false then
  748.             global_wait = (global_wait % 360) + 4
  749.             countspeed = 4
  750.             ls.C1 = CFrame.new(0,1,0) * CFrame.Angles(math.pi/2, 0 + angle/10, 0 + angle/10)
  751.             rs.C1 = CFrame.new(0,1,0) * CFrame.Angles(math.pi/2, 0 - angle/10, 0 + angle/10)
  752.             lh.C1 = CFrame.new(0,1,0.5) * CFrame.Angles(0 + angle/10, 0 + angle/10, 0  + angle/10)
  753.             rh.C1 = CFrame.new(0,1,0.5) * CFrame.Angles(0 + angle/10, 0 + angle/10, 0  + angle/10)
  754.             neck.C1 = CFrame.new(0,-0.5,0) * CFrame.Angles(math.pi/2, math.pi, 0)
  755.             rj.C0 = CFrame.new(0 + angle/25, 0, 0 - angle/25) * CFrame.Angles(math.pi/2, math.pi, math.rad(global_wait*4))
  756.         elseif thriller == true and jump == false and sit == false then
  757.             countspeed = 2
  758.             ls.C1 = CFrame.new(0,0.5,-0.5) * CFrame.Angles(0, 0, math.pi/2 + angle/15)
  759.             rs.C1 = CFrame.new(0,0.5,-0.5) * CFrame.Angles(0, 0, -math.pi/2 + angle/15)
  760.             lh.C1 = CFrame.new(0,1,0.5) * CFrame.Angles(math.pi/60 - angle/45, 0, 0 + angle/15)
  761.             rh.C1 = CFrame.new(0,1,0.5) * CFrame.Angles(math.pi/60 + angle/45, 0, 0 + angle/15)
  762.             neck.C1 = CFrame.new(0,-0.5,0) * CFrame.Angles(math.pi/2 + angle/15, math.pi + angle/10, 0)
  763.             rj.C0 = CFrame.new(0, 0, 0) * CFrame.Angles(math.pi/2 + angle/50 , math.pi + angle/50, 0 + angle/50)
  764.         elseif barrel == true and jump == false and sit == false then
  765.             ls.C1 = CFrame.new(0,0.5,-0.5) * CFrame.Angles(0, 0, math.pi)
  766.             rs.C1 = CFrame.new(0,0.5,-0.5) * CFrame.Angles(0, 0, math.pi)
  767.             lh.C1 = CFrame.new(0,1,0.5) * CFrame.Angles(0, 0, 0)
  768.             rh.C1 = CFrame.new(0,1,0.5) * CFrame.Angles(0, 0, 0)
  769.             neck.C1 = CFrame.new(0,-0.5,0) * CFrame.Angles(math.pi/2, math.pi, 0)
  770.             rj.C0 = CFrame.new(0 + angle, -1.8, 0) * CFrame.Angles(0, math.pi, 0 + angle)
  771.         elseif sax == true and jump == false and sit == false then
  772.             countspeed = 2
  773.             ls.C1 = CFrame.new(0,0.75,-0.25) * CFrame.Angles(-math.pi/5, 0, math.pi/2 - math.abs(angle/30))
  774.             rs.C1 = CFrame.new(0,0.75,-0.25) * CFrame.Angles(-math.pi/5, 0, -math.pi/2 + math.abs(angle/30))
  775.             lh.C1 = CFrame.new(0,1,0.5) * CFrame.Angles(0, 0, 0 - math.abs(angle/30))
  776.             rh.C1 = CFrame.new(0,1,0.5) * CFrame.Angles(0, 0, 0 + math.abs(angle/30))
  777.             neck.C1 = CFrame.new(0,-0.5,0) * CFrame.Angles(math.pi/2, math.pi, 0)
  778.             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)
  779.         elseif spooky == true and jump == false and sit == false then
  780.             countspeed = 3
  781.             ls.C1 = CFrame.new(0,0.5,-0.5) * CFrame.Angles(0, 0, math.pi/2 - angle/1.5)
  782.             rs.C1 = CFrame.new(0,0.5,-0.5) * CFrame.Angles(0, 0, -math.pi/2 + angle/1.5)
  783.             lh.C1 = CFrame.new(0,1,0.5) * CFrame.Angles(0, 0, 0 - angle/16)
  784.             rh.C1 = CFrame.new(0,1,0.5) * CFrame.Angles(0, 0, 0 + angle/16)
  785.             neck.C1 = CFrame.new(0,-0.5,0) * CFrame.Angles(math.pi/2  + angle/12, math.pi, 0)
  786.             rj.C0 = CFrame.new(0, 0 + angle / 35, 0) * CFrame.Angles(math.pi/2 + angle/25, math.pi, 0)
  787.         elseif stride == true and jump == false and sit == false then
  788.             countspeed = 2.5
  789.             ls.C1 = CFrame.new(0,0.5,-0.5) * CFrame.Angles(angle/16, angle/16,math.pi/3.5 + angle/8)
  790.             rs.C1 = CFrame.new(0,0.5,-0.5) * CFrame.Angles(angle/16, -angle/16,-math.pi/1.5 + -angle/8)
  791.             lh.C1 = CFrame.new(0,1,0.5) * CFrame.Angles(0, angle/16, angle/16)
  792.             rh.C1 = CFrame.new(0,1,0.5) * CFrame.Angles(0, angle/16, angle/16)
  793.             neck.C1 = CFrame.new(0,-0.5,0) * CFrame.Angles(math.pi/2, math.pi, 0)
  794.             rj.C0 = CFrame.new(0, 0, 0) * CFrame.Angles(math.pi/2-angle/16, math.pi, 0)
  795.         elseif shuffle == true and jump == false and sit == false then
  796.             countspeed = 2
  797.             ls.C1 = CFrame.new(0,0.75,-0.35) * CFrame.Angles(math.pi/8, 0, math.pi/2 + angle/3.5)
  798.             rs.C1 = CFrame.new(0,0.75,-0.35) * CFrame.Angles(math.pi/8, 0, -math.pi/2 + angle/3.5)
  799.             lh.C1 = CFrame.new(0 + angle/50,1,0.5) * CFrame.Angles(0, 0 + angle/35, 0 + angle/15)
  800.             rh.C1 = CFrame.new(0 + angle/50,1,0.5) * CFrame.Angles(0, 0 + angle/35, 0 + angle/15)
  801.             neck.C1 = CFrame.new(0,-0.5,0) * CFrame.Angles(math.pi/2 + angle/15, math.pi, 0)
  802.             rj.C0 = CFrame.new(0, 0, 0) * CFrame.Angles(math.pi/2 - angle/35, math.pi - angle/35, 0)
  803.         elseif rock == true and jump == false and sit == false then
  804.             countspeed = 4
  805.             ls.C1 = CFrame.new(0,0.5,-0.5) * CFrame.Angles(0, 0, math.pi/2+angle/2)
  806.             rs.C1 = CFrame.new(0,0.5,-0.5) * CFrame.Angles(0, 0, -math.pi/2+angle/2)
  807.             lh.C1 = CFrame.new(0,1,0.5) * CFrame.Angles(0+angle/32, 0, 0+angle/32)
  808.             rh.C1 = CFrame.new(0,1,0.5) * CFrame.Angles(0+angle/32, 0, 0-angle/32)
  809.             neck.C1 = CFrame.new(0,-0.5,0) * CFrame.Angles(math.pi/2, math.pi, 0)
  810.             rj.C0 = CFrame.new(0, 0 - angle/50, 0) * CFrame.Angles(math.pi/2, math.pi, 0)
  811.         elseif gagnam == true and jump == false and sit == false then
  812.             countspeed = 4
  813.             ls.C1 = CFrame.new(0,0.75,-0.15) * CFrame.Angles(-math.pi/4, 0, (math.pi/2 + angle/14) - math.pi/20)
  814.             rs.C1 = CFrame.new(0,0.75,-0.15) * CFrame.Angles(-math.pi/4, 0, (-math.pi/2 - angle/14) + math.pi/20)
  815.             lh.C1 = CFrame.new(0,1,0.5) * CFrame.Angles(0 + angle/16, 0, 0)
  816.             rh.C1 = CFrame.new(0,1,0.5) * CFrame.Angles(0 + angle/16, 0, 0)
  817.             neck.C1 = CFrame.new(0,-0.5,0) * CFrame.Angles(math.pi/2 + angle/20, math.pi, 0)
  818.             rj.C0 = CFrame.new(0, 0 + angle/40, 0) * CFrame.Angles(math.pi/2, math.pi, 0)
  819.         elseif snoop == true and jump == false and sit == false then
  820.             countspeed = 2
  821.             ls.C1 = CFrame.new(0,0.5,-0.5) * CFrame.Angles(math.pi/12, 0, math.pi/4 + angle/4)
  822.             rs.C1 = CFrame.new(0,0.5,-0.5) * CFrame.Angles(math.pi/12, 0, -math.pi/4 + angle/4)
  823.             lh.C1 = CFrame.new(0,1,0.5) * CFrame.Angles(math.pi/24, 0, 0 + angle/4)
  824.             rh.C1 = CFrame.new(0,1,0.5) * CFrame.Angles(math.pi/24, 0, 0 + angle/4)
  825.             neck.C1 = CFrame.new(0,-0.5,0) * CFrame.Angles(math.pi/2 - angle/8, math.pi, 0)
  826.             rj.C0 = CFrame.new(0, 0 + angle/48, 0) * CFrame.Angles(math.pi/2 + angle/24, math.pi, 0)
  827.         elseif darude == true and jump == false and sit == false then
  828.             countspeed = 3
  829.             ls.C1 = CFrame.new(0,0.5,-0.5) * CFrame.Angles(0, 0, 0 + angle/1.5)
  830.             rs.C1 = CFrame.new(0,0.5,-0.5) * CFrame.Angles(0, 0, 0 + angle/3)
  831.             lh.C1 = CFrame.new(0,1,0.5) * CFrame.Angles(0, 0, 0 - angle/3)
  832.             rh.C1 = CFrame.new(0,1,0.5) * CFrame.Angles(0, 0, 0 - angle/1.5)
  833.             neck.C1 = CFrame.new(0,-0.5,0) * CFrame.Angles(math.pi/2, math.pi, 0)
  834.             rj.C0 = CFrame.new(0, 0+ angle/45, 0) * CFrame.Angles(math.pi/2 - angle/6, math.pi, 0)
  835.         elseif taco == true and jump == false and sit == false then
  836.             countspeed = 4
  837.             global_wait = (global_wait % 360) + 4
  838.             ls.C1 = CFrame.new(0,1,-0.25) * CFrame.Angles(math.pi/6 + angle/12, 0, math.pi)
  839.             rs.C1 = CFrame.new(0,1,-0.25) * CFrame.Angles(math.pi/6 + angle/12, 0, math.pi)
  840.             lh.C1 = CFrame.new(0,1,0.5) * CFrame.Angles(0, 0, math.pi/8 + angle/16)
  841.             rh.C1 = CFrame.new(0,1,0.5) * CFrame.Angles(0, 0, math.pi/8 + angle/16)
  842.             neck.C1 = CFrame.new(0,-0.5,0) * CFrame.Angles(math.pi/2 - math.pi/8 + angle/16, math.pi, 0)
  843.             rj.C0 = CFrame.new(0, 0.25 + angle/12, 0) * CFrame.Angles(math.pi/2, math.pi, math.rad(global_wait*4))
  844.         end
  845.     end
  846. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement