Advertisement
iaminonlinetoorare

guitar script

Jan 24th, 2024 (edited)
160
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 6.35 KB | None | 0 0
  1. --Guitar script (use loadstring to execute)
  2. Player=game.Players.LocalPlayer
  3. Character=Player.Character
  4. Character.Animate.Disabled=true
  5. local LeftArm = Character["Left Arm"]
  6. local RightArm = Character["Right Arm"]
  7. local LeftLeg = Character["Left Leg"]
  8. local RightLeg = Character["Right Leg"]
  9. local Head = Character.Head
  10. local Torso = Character.Torso
  11. local Camera = game.Workspace.CurrentCamera
  12. local RootPart = Character.HumanoidRootPart
  13. local RootJoint = RootPart.RootJoint
  14. local Humanoid=Character.Humanoid
  15. CAM=Camera
  16. FF=Instance.new('ForceField',Character)
  17. FF.Visible=false
  18. Humanoid.Name='LOLOL YOU CANT HIT ME'
  19. Character.
  20. Health:remove()
  21. for i,v in pairs (Humanoid:GetPlayingAnimationTracks()) do
  22.     v:Stop()
  23. end
  24.  
  25. local newMotor = function(part0, part1, c0, c1)
  26.          w = Instance.new('Motor')
  27.         w.Parent = part0
  28.         w.Part0 = part0
  29.         w.Part1 = part1
  30.         w.C0 = c0
  31.         w.C1 = c1
  32.    
  33.     return w
  34. end
  35.  
  36.  
  37.  
  38.  
  39. RootCF = CFrame.fromEulerAnglesXYZ(-1.57, 0, 3.14)
  40. NeckCF = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  41.  
  42. local RW = newMotor(Torso, RightArm, CFrame.new(2.5, 0, 0), CFrame.new(0, 0, 0))
  43. local LW = newMotor(Torso, LeftArm, CFrame.new(-2.5, 0, 0), CFrame.new(0, 0, 0))
  44. local RH = newMotor(Torso, RightLeg, CFrame.new(1.5, -3, 0), CFrame.new(0, 0, 0))
  45. local LH = newMotor(Torso, LeftLeg, CFrame.new(-1.5, -3, 0), CFrame.new(0, 0, 0))
  46. RootJoint.C1 = CFrame.new(0, 0, 0)
  47. RootJoint.C0 = CFrame.new(0, 0, 0)
  48. Torso.Neck.C1 = CFrame.new(0, 0, 0)
  49. Torso.Neck.C0 = CFrame.new(0, 2.5, 0)
  50.  
  51. local rarmc1 = RW.C1
  52. local larmc1 = LW.C1
  53. local rlegc1 = RH.C1
  54. local llegc1 = LH.C1
  55.  
  56. local resetc1 = false
  57.  
  58. function clerp(a, b, t)
  59.     return a:lerp(b, t)
  60. end
  61. function AutoWeld(Foop, OOF)
  62.                 local W = Instance.new("Weld")
  63.                 W.Part0 = Foop
  64.                 W.Part1 = OOF
  65.                 local CJ = CFrame.new(Foop.Position)
  66.                 local C0 = Foop.CFrame:inverse()*CJ
  67.                 local C1 = OOF.CFrame:inverse()*CJ
  68.                 W.C0 = C0
  69.                 W.C1 = C1
  70.                 W.Name='o0o'
  71.                 W.Parent = Foop
  72.                
  73. end
  74.  
  75.  
  76.  
  77. function PlayAnimationFromTable(table, speed, bool)
  78.     RootJoint.C0 = clerp(RootJoint.C0, table[1], speed)
  79.     Torso.Neck.C0 = clerp(Torso.Neck.C0, table[2], speed)
  80.     RW.C0 = clerp(RW.C0, table[3], speed)
  81.     LW.C0 = clerp(LW.C0, table[4], speed)
  82.     RH.C0 = clerp(RH.C0, table[5], speed)
  83.     LH.C0 = clerp(LH.C0, table[6], speed)
  84.     if bool == true then
  85.         if resetc1 == false then
  86.             resetc1 = true
  87.             RootJoint.C1 = RootJoint.C1
  88.             Torso.Neck.C1 = Torso.Neck.C1
  89.             RW.C1 = rarmc1
  90.             LW.C1 = larmc1
  91.             RH.C1 = rlegc1
  92.             LH.C1 = llegc1
  93.         end
  94.     end
  95. end
  96. sine=1
  97.  
  98. Torso.CFrame=Torso.CFrame*CFrame.new(0,1,0)
  99.  
  100.  
  101. Grass=Instance.new('Part',Character)
  102. Grass.Name='Grass'
  103. Grass.Anchored=true
  104. Grass.Size=Vector3.new(11.42, 0.17, 17.6)
  105. Grass.CFrame=Torso.CFrame*CFrame.new(-0.43, -3.905, -0.1)
  106. Grass.Material='Grass'
  107. Grass.BrickColor=BrickColor.new('Bright green')
  108. m=Instance.new('CylinderMesh',Grass)
  109. White=Instance.new('Part',Character)
  110. White.Name='White Space'
  111. White.Anchored=true
  112. White.Size=Vector3.new(35.2, 0.05, 17.6)
  113. White.CFrame=Torso.CFrame*CFrame.new(0.39, -3.965, -0.1)
  114. White.Material='Neon'
  115. White.BrickColor=BrickColor.new('Medium stone grey')
  116. m=Instance.new('CylinderMesh',White)
  117.  
  118.  
  119. Humanoid.AutoRotate=false
  120. Humanoid.WalkSpeed=0
  121. Humanoid.JumpPower=0
  122.  
  123. Flute=Instance.new('Part',Character)
  124. Flute.Name='Flute'
  125. Flute.CFrame=Torso.CFrame*CFrame.new(-0.5,-.5,-1)*CFrame.Angles(0,0,-2.5)
  126. m=Instance.new('SpecialMesh',Flute)
  127. m.MeshId='http://www.roblox.com/asset/?id=161269074'
  128. m.TextureId='http://www.roblox.com/asset/?id=228874694'
  129. m.Scale=Vector3.new(0.922, 0.922, 0.922)
  130. Flute.Size=Vector3.new(.5,2,.5)
  131.  
  132. AutoWeld(Flute,Torso)
  133. THEME=Instance.new('Sound',Character.Torso)
  134. music=nil
  135. firsttype=false
  136. Player.Chatted:connect(function(msg)
  137. for def in string.gmatch(msg, "%d+") do
  138.             print(def)
  139.  
  140. if def~=nil then
  141.     music=def
  142. end
  143.     end
  144.  
  145. for def in string.gmatch(msg,"[%u%l%p]+") do
  146.             print(def)
  147.     if def=='Play/' and music~=nil then
  148.         THEME:stop()
  149.         THEME.SoundId='rbxassetid://'.. music
  150.         THEME:play()
  151.     elseif def=='Play/Demo' then
  152.         THEME:stop()
  153.         THEME.SoundId='rbxassetid://'.. 164167420
  154.         THEME:play()
  155.     elseif def=='S_Guitar' then
  156.         THEME:stop()
  157.     end
  158. end
  159. music=nil
  160. end)
  161. Ms=Player:GetMouse()
  162. Ms.KeyDown:connect(function(key)
  163.     if key=='f' then
  164.     if cam then
  165.         cam=false
  166.         CAM.CameraType='Custom'
  167.     else
  168.         cam=true
  169.         CAM.CameraType='Scriptable'
  170.     end
  171. end
  172. end)
  173.  
  174.  
  175. cam=true--Custom Camera Perspectives
  176. if cam==true then
  177.     CAM.CameraType=Enum.CameraType.Scriptable
  178.  
  179. end
  180. Campart1=Instance.new('Part',Character)
  181. Campart1.Transparency=1
  182. Campart1.Anchored=true
  183. Campart1.CanCollide=false
  184. Campart2=Campart1:clone()
  185. Campart2.Parent=Character
  186. Campart3=Campart1:clone()
  187. Campart3.Parent=Character
  188.  
  189. camtime=0
  190. camphase=0
  191.  
  192. while 1 do
  193. wait() 
  194.     sine=sine+1
  195.             PlayAnimationFromTable({
  196.                 CFrame.new(-math.cos(sine/16)*.2, math.cos(sine/8)/8, 0) * CFrame.Angles(0, 0, 0),
  197.                 CFrame.new(0, 1.5, 0) * CFrame.new(0, 0, -.3) * CFrame.Angles(-.5,0.5-THEME.PlaybackLoudness/150, 0),
  198.                 CFrame.new(1.5-THEME.PlaybackLoudness/700, .5, -.5)*CFrame.Angles(1.5+THEME.PlaybackLoudness/700,0,0-THEME.PlaybackLoudness/700),  
  199.                 CFrame.new(-1.5+THEME.PlaybackLoudness/700, 0, -.5)*CFrame.Angles(1-THEME.PlaybackLoudness/700,0,0+THEME.PlaybackLoudness/700),
  200.                 CFrame.new(1+math.cos(sine/16)*.2,-2-math.cos(sine/8)/8, 0)*CFrame.Angles(0,0,0.5) ,
  201.                 CFrame.new(-1+math.cos(sine/16)*.2,-2-math.cos(sine/8)/8,0)*CFrame.Angles(0,0,-0.5),
  202.             }, .3, false)
  203.            
  204. White.Size=Vector3.new(35.2+THEME.PlaybackLoudness/10, 0.05, 17.6+THEME.PlaybackLoudness/10)
  205. Campart1=Instance.new('Part')
  206. if cam==true then
  207.     CAM.CameraType='Scriptable'
  208. Campart1.CFrame=Torso.CFrame*CFrame.new(8,8,8)*CFrame.Angles(-0.5,.5,-0.5)         
  209. Campart2.CFrame=Torso.CFrame*CFrame.new(-8,-3,-5)*CFrame.Angles(-1,-2,-1)
  210. Campart3.CFrame=Flute.CFrame*CFrame.new(1.5,0,-1)*CFrame.Angles(0,1.8,3)
  211. if camphase==0 then
  212.     if camtime<20+math.random(-2,2) then
  213.                 CAM.CFrame=Campart1.CFrame
  214.         camtime=camtime+1
  215.             else
  216.         camtime=0
  217.         camphase=camphase+1
  218.     end
  219. elseif camphase==1 then
  220.     if camtime<40+math.random(-8,12) then
  221.                 CAM.CFrame=Campart2.CFrame
  222.         camtime=camtime+1
  223.             else
  224.         camtime=0
  225.         camphase=camphase+1
  226.     end
  227. elseif camphase==2 then
  228.     if camtime<50+math.random(-2,5) then
  229.                 CAM.CFrame=Campart3.CFrame
  230.         camtime=camtime+1
  231.     else
  232.         camtime=0
  233.         camphase=camphase+1
  234.     end
  235.    
  236. elseif camphase==3 then
  237.     camphase=0
  238. end
  239.  
  240.  
  241. end
  242. end
Advertisement
Comments
Add Comment
Please, Sign In to add comment
Advertisement