SHOW:
|
|
- or go back to the newest paste.
| 1 | if game:GetService("RunService"):IsClient() then error("Please run as a server script. Use h/ instead of hl/.") end
| |
| 2 | print("FE Compatibility: by WaverlyCole & Mokiros")
| |
| 3 | InternalData = {}
| |
| 4 | do | |
| 5 | script.Parent = owner.Character | |
| 6 | local Event = Instance.new("RemoteEvent")
| |
| 7 | Event.Name = "UserInput" | |
| 8 | local function NewFakeEvent() | |
| 9 | local Fake = {fakeEvent=true,Connect=function(self,Func)self.Function=Func end}Fake.connect = Fake.Connect
| |
| 10 | return Fake | |
| 11 | end | |
| 12 | local Mouse = {Target=nil,Hit=CFrame.new(),KeyUp=NewFakeEvent(),KeyDown=NewFakeEvent(),Button1Up=NewFakeEvent(),Button1Down=NewFakeEvent()}
| |
| 13 | local UserInputService = {InputBegan=NewFakeEvent(),InputEnded=NewFakeEvent()}
| |
| 14 | local ContextActionService = {Actions={},BindAction = function(self,actionName,Func,touch,...)
| |
| 15 | self.Actions[actionName] = Func and {Name=actionName,Function=Func,Keys={...}} or nil
| |
| 16 | end};ContextActionService.UnBindAction = ContextActionService.BindAction | |
| 17 | local function TriggerEvent(self,Event,...) | |
| 18 | local Trigger = Mouse[Event] | |
| 19 | if Trigger and Trigger.fakeEvent and Trigger.Function then | |
| 20 | Trigger.Function(...) | |
| 21 | end | |
| 22 | end | |
| 23 | Mouse.TrigEvent = TriggerEvent | |
| 24 | UserInputService.TrigEvent = TriggerEvent | |
| 25 | Event.OnServerEvent:Connect(function(FiredBy,Input) | |
| 26 | if FiredBy.Name ~= owner.Name then end | |
| 27 | if Input.MouseEvent then | |
| 28 | Mouse.Target = Input.Target | |
| 29 | Mouse.Hit = Input.Hit | |
| 30 | else | |
| 31 | local Begin = Input.UserInputState == Enum.UserInputState.Begin | |
| 32 | if Input.UserInputType == Enum.UserInputType.MouseButton1 then | |
| 33 | return Mouse:TrigEvent(Begin and "Button1Down" or "Button1Up") | |
| 34 | end | |
| 35 | for _,Action in pairs(ContextActionService.Actions) do | |
| 36 | for _,Key in pairs(Action.Keys) do | |
| 37 | if Key==Input.KeyCode then | |
| 38 | Action.Function(Action.Name,Input.UserInputState,Input) | |
| 39 | end | |
| 40 | end | |
| 41 | end | |
| 42 | Mouse:TrigEvent(Begin and "KeyDown" or "KeyUp",Input.KeyCode.Name:lower()) | |
| 43 | UserInputService:TrigEvent(Begin and "InputBegan" or "InputEnded",Input,false) | |
| 44 | end | |
| 45 | end) | |
| 46 | InternalData["Mouse"] = Mouse | |
| 47 | InternalData["ContextActionService"] = ContextActionService | |
| 48 | InternalData["UserInputService"] = UserInputService | |
| 49 | Event.Parent = NLS([[ | |
| 50 | local Player = owner | |
| 51 | local Event = script:WaitForChild("UserInput")
| |
| 52 | local UserInputService = game:GetService("UserInputService")
| |
| 53 | local Mouse = Player:GetMouse() | |
| 54 | local Input = function(Input,gameProcessedEvent) | |
| 55 | if gameProcessedEvent then return end | |
| 56 | Event:FireServer({KeyCode=Input.KeyCode,UserInputType=Input.UserInputType,UserInputState=Input.UserInputState})
| |
| 57 | end | |
| 58 | UserInputService.InputBegan:Connect(Input) | |
| 59 | UserInputService.InputEnded:Connect(Input) | |
| 60 | local Hit,Target | |
| 61 | while wait(1/30) do | |
| 62 | if Hit ~= Mouse.Hit or Target ~= Mouse.Target then | |
| 63 | Hit,Target = Mouse.Hit,Mouse.Target | |
| 64 | Event:FireServer({["MouseEvent"]=true,["Target"]=Target,["Hit"]=Hit})
| |
| 65 | end | |
| 66 | end | |
| 67 | ]],owner.Character) | |
| 68 | end | |
| 69 | RealGame = game;game = setmetatable({},{
| |
| 70 | __index = function (self,Index) | |
| 71 | local Sandbox = function (Thing) | |
| 72 | if Thing:IsA("Player") then
| |
| 73 | local RealPlayer = Thing | |
| 74 | return setmetatable({},{
| |
| 75 | __index = function (self,Index) | |
| 76 | local Type = type(RealPlayer[Index]) | |
| 77 | if Type == "function" then | |
| 78 | if Index:lower() == "getmouse" or Index:lower() == "mouse" then | |
| 79 | return function (self) | |
| 80 | return InternalData["Mouse"] | |
| 81 | end | |
| 82 | end | |
| 83 | return function (self,...) | |
| 84 | return RealPlayer[Index](RealPlayer,...) | |
| 85 | end | |
| 86 | else | |
| 87 | return RealPlayer[Index] | |
| 88 | end | |
| 89 | end; | |
| 90 | __tostring = function(self) | |
| 91 | return RealPlayer.Name | |
| 92 | end | |
| 93 | }) | |
| 94 | end | |
| 95 | end | |
| 96 | if RealGame[Index] then | |
| 97 | local Type = type(RealGame[Index]) | |
| 98 | if Type == "function" then | |
| 99 | if Index:lower() == "getservice" or Index:lower() == "service" then | |
| 100 | return function (self,Service) | |
| 101 | if Service:lower() == "players" then | |
| 102 | return setmetatable({},{
| |
| 103 | __index = function (self2,Index2) | |
| 104 | local RealService = RealGame:GetService(Service) | |
| 105 | local Type2 = type(Index2) | |
| 106 | if Type2 == "function" then | |
| 107 | return function (self,...) | |
| 108 | return RealService[Index2](RealService,...) | |
| 109 | end | |
| 110 | else | |
| 111 | if Index2:lower() == "localplayer" then | |
| 112 | return Sandbox(owner) | |
| 113 | end | |
| 114 | return RealService[Index2] | |
| 115 | end | |
| 116 | end; | |
| 117 | __tostring = function(self) | |
| 118 | return RealGame:GetService(Service).Name | |
| 119 | end | |
| 120 | }) | |
| 121 | elseif Service:lower() == "contextactionservice" then | |
| 122 | return InternalData["ContextActionService"] | |
| 123 | elseif Service:lower() == "contextactionservice" then | |
| 124 | return InternalData["UserInputService"] | |
| 125 | elseif Service:lower() == "runservice" then | |
| 126 | return setmetatable({},{
| |
| 127 | __index = function(self2,Index2) | |
| 128 | local RealService = RealGame:GetService(Service) | |
| 129 | local Type2 = type(Index2) | |
| 130 | if Type2 == "function" then | |
| 131 | return function (self,...) | |
| 132 | return RealService[Index2](RealService,...) | |
| 133 | end | |
| 134 | else | |
| 135 | if Index2:lower() == "bindtorenderstep" then | |
| 136 | return function (self,Name,Priority,Function) | |
| 137 | return RealGame:GetService("RunService").Stepped:Connect(Function)
| |
| 138 | end | |
| 139 | end | |
| 140 | if Index2:lower() == "renderstepped" then | |
| 141 | return RealService["Stepped"] | |
| 142 | end | |
| 143 | return RealService[Index2] | |
| 144 | end | |
| 145 | end | |
| 146 | }) | |
| 147 | else | |
| 148 | return RealGame:GetService(Service) | |
| 149 | end | |
| 150 | end | |
| 151 | end | |
| 152 | return function (self,...) | |
| 153 | return RealGame[Index](RealGame,...) | |
| 154 | end | |
| 155 | else | |
| 156 | if game:GetService(Index) then | |
| 157 | return game:GetService(Index) | |
| 158 | end | |
| 159 | return RealGame[Index] | |
| 160 | end | |
| 161 | else | |
| 162 | return nil | |
| 163 | end | |
| 164 | end | |
| 165 | });Game = game;owner = game:GetService("Players").LocalPlayer
| |
| 166 | print("Complete! Running...")
| |
| 167 | ||
| 168 | print('Guitar')
| |
| 169 | print('By slenercat5')
| |
| 170 | print('F to toggle Camera perspectives')--FANCY :D
| |
| 171 | Player=game.Players.LocalPlayer | |
| 172 | Character=Player.Character | |
| 173 | Character.Animate.Disabled=true | |
| 174 | local LeftArm = Character["Left Arm"] | |
| 175 | local RightArm = Character["Right Arm"] | |
| 176 | local LeftLeg = Character["Left Leg"] | |
| 177 | local RightLeg = Character["Right Leg"] | |
| 178 | local Head = Character.Head | |
| 179 | local Torso = Character.Torso | |
| 180 | local Camera = game.Workspace.CurrentCamera | |
| 181 | local RootPart = Character.HumanoidRootPart | |
| 182 | local RootJoint = RootPart.RootJoint | |
| 183 | local Humanoid=Character.Humanoid | |
| 184 | CAM=Camera | |
| 185 | FF=Instance.new('ForceField',Character)
| |
| 186 | FF.Visible=false | |
| 187 | Humanoid.Name='LOLOL YOU CANT HIT ME' | |
| 188 | Character. | |
| 189 | Health:remove() | |
| 190 | for i,v in pairs (Humanoid:GetPlayingAnimationTracks()) do | |
| 191 | v:Stop() | |
| 192 | end | |
| 193 | ||
| 194 | local newMotor = function(part0, part1, c0, c1) | |
| 195 | w = Instance.new('Motor')
| |
| 196 | w.Parent = part0 | |
| 197 | w.Part0 = part0 | |
| 198 | w.Part1 = part1 | |
| 199 | w.C0 = c0 | |
| 200 | w.C1 = c1 | |
| 201 | ||
| 202 | return w | |
| 203 | end | |
| 204 | ||
| 205 | ||
| 206 | ||
| 207 | ||
| 208 | RootCF = CFrame.fromEulerAnglesXYZ(-1.57, 0, 3.14) | |
| 209 | NeckCF = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0) | |
| 210 | ||
| 211 | local RW = newMotor(Torso, RightArm, CFrame.new(2.5, 0, 0), CFrame.new(0, 0, 0)) | |
| 212 | local LW = newMotor(Torso, LeftArm, CFrame.new(-2.5, 0, 0), CFrame.new(0, 0, 0)) | |
| 213 | local RH = newMotor(Torso, RightLeg, CFrame.new(1.5, -3, 0), CFrame.new(0, 0, 0)) | |
| 214 | local LH = newMotor(Torso, LeftLeg, CFrame.new(-1.5, -3, 0), CFrame.new(0, 0, 0)) | |
| 215 | RootJoint.C1 = CFrame.new(0, 0, 0) | |
| 216 | RootJoint.C0 = CFrame.new(0, 0, 0) | |
| 217 | Torso.Neck.C1 = CFrame.new(0, 0, 0) | |
| 218 | Torso.Neck.C0 = CFrame.new(0, 2.5, 0) | |
| 219 | ||
| 220 | local rarmc1 = RW.C1 | |
| 221 | local larmc1 = LW.C1 | |
| 222 | local rlegc1 = RH.C1 | |
| 223 | local llegc1 = LH.C1 | |
| 224 | ||
| 225 | local resetc1 = false | |
| 226 | ||
| 227 | function clerp(a, b, t) | |
| 228 | return a:lerp(b, t) | |
| 229 | end | |
| 230 | function AutoWeld(Foop, OOF) | |
| 231 | local W = Instance.new("Weld")
| |
| 232 | W.Part0 = Foop | |
| 233 | W.Part1 = OOF | |
| 234 | local CJ = CFrame.new(Foop.Position) | |
| 235 | local C0 = Foop.CFrame:inverse()*CJ | |
| 236 | local C1 = OOF.CFrame:inverse()*CJ | |
| 237 | W.C0 = C0 | |
| 238 | W.C1 = C1 | |
| 239 | W.Name='o0o' | |
| 240 | W.Parent = Foop | |
| 241 | ||
| 242 | end | |
| 243 | ||
| 244 | ||
| 245 | ||
| 246 | function PlayAnimationFromTable(table, speed, bool) | |
| 247 | RootJoint.C0 = clerp(RootJoint.C0, table[1], speed) | |
| 248 | Torso.Neck.C0 = clerp(Torso.Neck.C0, table[2], speed) | |
| 249 | RW.C0 = clerp(RW.C0, table[3], speed) | |
| 250 | LW.C0 = clerp(LW.C0, table[4], speed) | |
| 251 | RH.C0 = clerp(RH.C0, table[5], speed) | |
| 252 | LH.C0 = clerp(LH.C0, table[6], speed) | |
| 253 | if bool == true then | |
| 254 | if resetc1 == false then | |
| 255 | resetc1 = true | |
| 256 | RootJoint.C1 = RootJoint.C1 | |
| 257 | Torso.Neck.C1 = Torso.Neck.C1 | |
| 258 | RW.C1 = rarmc1 | |
| 259 | LW.C1 = larmc1 | |
| 260 | RH.C1 = rlegc1 | |
| 261 | LH.C1 = llegc1 | |
| 262 | end | |
| 263 | end | |
| 264 | end | |
| 265 | sine=1 | |
| 266 | ||
| 267 | Torso.CFrame=Torso.CFrame*CFrame.new(0,1,0) | |
| 268 | ||
| 269 | ||
| 270 | Grass=Instance.new('Part',Character)
| |
| 271 | Grass.Name='Grass' | |
| 272 | Grass.Anchored=true | |
| 273 | Grass.Size=Vector3.new(11.42, 0.17, 17.6) | |
| 274 | Grass.CFrame=Torso.CFrame*CFrame.new(-0.43, -3.905, -0.1) | |
| 275 | Grass.Material='Grass' | |
| 276 | Grass.BrickColor=BrickColor.new('Bright green')
| |
| 277 | m=Instance.new('CylinderMesh',Grass)
| |
| 278 | White=Instance.new('Part',Character)
| |
| 279 | White.Name='White Space' | |
| 280 | White.Anchored=true | |
| 281 | White.Size=Vector3.new(35.2, 0.05, 17.6) | |
| 282 | White.CFrame=Torso.CFrame*CFrame.new(0.39, -3.965, -0.1) | |
| 283 | White.Material='Neon' | |
| 284 | White.BrickColor=BrickColor.new('Medium stone grey')
| |
| 285 | m=Instance.new('CylinderMesh',White)
| |
| 286 | ||
| 287 | ||
| 288 | Humanoid.AutoRotate=false | |
| 289 | Humanoid.WalkSpeed=0 | |
| 290 | Humanoid.JumpPower=0 | |
| 291 | ||
| 292 | Flute=Instance.new('Part',Character)
| |
| 293 | Flute.Name='Flute' | |
| 294 | Flute.CFrame=Torso.CFrame*CFrame.new(-0.5,-.5,-1)*CFrame.Angles(0,0,-2.5) | |
| 295 | m=Instance.new('SpecialMesh',Flute)
| |
| 296 | m.MeshId='http://www.roblox.com/asset/?id=161269074' | |
| 297 | m.TextureId='http://www.roblox.com/asset/?id=228874694' | |
| 298 | m.Scale=Vector3.new(0.922, 0.922, 0.922) | |
| 299 | Flute.Size=Vector3.new(.5,2,.5) | |
| 300 | ||
| 301 | AutoWeld(Flute,Torso) | |
| 302 | THEME=Instance.new('Sound',Character.Torso)
| |
| 303 | music=nil | |
| 304 | firsttype=false | |
| 305 | Player.Chatted:connect(function(msg) | |
| 306 | for def in string.gmatch(msg, "%d+") do | |
| 307 | print(def) | |
| 308 | ||
| 309 | if def~=nil then | |
| 310 | music=def | |
| 311 | end | |
| 312 | end | |
| 313 | ||
| 314 | for def in string.gmatch(msg,"[%u%l%p]+") do | |
| 315 | print(def) | |
| 316 | if def=='Play/' and music~=nil then | |
| 317 | THEME:stop() | |
| 318 | THEME.SoundId='rbxassetid://'.. music | |
| 319 | THEME:play() | |
| 320 | elseif def=='Play/Demo' then | |
| 321 | THEME:stop() | |
| 322 | THEME.SoundId='rbxassetid://'.. 164167420 | |
| 323 | THEME:play() | |
| 324 | elseif def=='S_Guitar' then | |
| 325 | THEME:stop() | |
| 326 | end | |
| 327 | end | |
| 328 | music=nil | |
| 329 | end) | |
| 330 | Ms=Player:GetMouse() | |
| 331 | Ms.KeyDown:connect(function(key) | |
| 332 | if key=='f' then | |
| 333 | if cam then | |
| 334 | cam=false | |
| 335 | CAM.CameraType='Custom' | |
| 336 | else | |
| 337 | cam=true | |
| 338 | CAM.CameraType='Scriptable' | |
| 339 | end | |
| 340 | end | |
| 341 | end) | |
| 342 | ||
| 343 | ||
| 344 | cam=true--Custom Camera Perspectives | |
| 345 | if cam==true then | |
| 346 | CAM.CameraType=Enum.CameraType.Scriptable | |
| 347 | ||
| 348 | end | |
| 349 | Campart1=Instance.new('Part',Character)
| |
| 350 | Campart1.Transparency=1 | |
| 351 | Campart1.Anchored=true | |
| 352 | Campart1.CanCollide=false | |
| 353 | Campart2=Campart1:clone() | |
| 354 | Campart2.Parent=Character | |
| 355 | Campart3=Campart1:clone() | |
| 356 | Campart3.Parent=Character | |
| 357 | ||
| 358 | camtime=0 | |
| 359 | camphase=0 | |
| 360 | ||
| 361 | while 1 do | |
| 362 | wait() | |
| 363 | sine=sine+1 | |
| 364 | PlayAnimationFromTable({
| |
| 365 | CFrame.new(-math.cos(sine/16)*.2, math.cos(sine/8)/8, 0) * CFrame.Angles(0, 0, 0), | |
| 366 | CFrame.new(0, 1.5, 0) * CFrame.new(0, 0, -.3) * CFrame.Angles(-.5,0.5-THEME.PlaybackLoudness/150, 0), | |
| 367 | CFrame.new(1.5-THEME.PlaybackLoudness/700, .5, -.5)*CFrame.Angles(1.5+THEME.PlaybackLoudness/700,0,0-THEME.PlaybackLoudness/700), | |
| 368 | CFrame.new(-1.5+THEME.PlaybackLoudness/700, 0, -.5)*CFrame.Angles(1-THEME.PlaybackLoudness/700,0,0+THEME.PlaybackLoudness/700), | |
| 369 | CFrame.new(1+math.cos(sine/16)*.2,-2-math.cos(sine/8)/8, 0)*CFrame.Angles(0,0,0.5) , | |
| 370 | CFrame.new(-1+math.cos(sine/16)*.2,-2-math.cos(sine/8)/8,0)*CFrame.Angles(0,0,-0.5), | |
| 371 | }, .3, false) | |
| 372 | ||
| 373 | White.Size=Vector3.new(35.2+THEME.PlaybackLoudness/10, 0.05, 17.6+THEME.PlaybackLoudness/10) | |
| 374 | Campart1=Instance.new('Part')
| |
| 375 | if cam==true then | |
| 376 | CAM.CameraType='Scriptable' | |
| 377 | Campart1.CFrame=Torso.CFrame*CFrame.new(8,8,8)*CFrame.Angles(-0.5,.5,-0.5) | |
| 378 | Campart2.CFrame=Torso.CFrame*CFrame.new(-8,-3,-5)*CFrame.Angles(-1,-2,-1) | |
| 379 | Campart3.CFrame=Flute.CFrame*CFrame.new(1.5,0,-1)*CFrame.Angles(0,1.8,3) | |
| 380 | if camphase==0 then | |
| 381 | if camtime<20+math.random(-2,2) then | |
| 382 | CAM.CFrame=Campart1.CFrame | |
| 383 | camtime=camtime+1 | |
| 384 | else | |
| 385 | camtime=0 | |
| 386 | camphase=camphase+1 | |
| 387 | end | |
| 388 | elseif camphase==1 then | |
| 389 | if camtime<40+math.random(-8,12) then | |
| 390 | CAM.CFrame=Campart2.CFrame | |
| 391 | camtime=camtime+1 | |
| 392 | else | |
| 393 | camtime=0 | |
| 394 | camphase=camphase+1 | |
| 395 | end | |
| 396 | elseif camphase==2 then | |
| 397 | if camtime<50+math.random(-2,5) then | |
| 398 | CAM.CFrame=Campart3.CFrame | |
| 399 | camtime=camtime+1 | |
| 400 | else | |
| 401 | camtime=0 | |
| 402 | camphase=camphase+1 | |
| 403 | end | |
| 404 | ||
| 405 | elseif camphase==3 then | |
| 406 | camphase=0 | |
| 407 | end | |
| 408 | ||
| 409 | ||
| 410 | end | |
| 411 | end |