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