Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if game:GetService("RunService"):IsClient() then error("Please run as a server script. Use h/ instead of hl/.") end
- print("FE Compatibility: by WaverlyCole & Mokiros")
- InternalData = {}
- do
- script.Parent = owner.Character
- local Event = Instance.new("RemoteEvent")
- Event.Name = "UserInput"
- local function NewFakeEvent()
- local Fake = {fakeEvent=true,Connect=function(self,Func)self.Function=Func end}Fake.connect = Fake.Connect
- return Fake
- end
- local Mouse = {Target=nil,Hit=CFrame.new(),KeyUp=NewFakeEvent(),KeyDown=NewFakeEvent(),Button1Up=NewFakeEvent(),Button1Down=NewFakeEvent()}
- local UserInputService = {InputBegan=NewFakeEvent(),InputEnded=NewFakeEvent()}
- local ContextActionService = {Actions={},BindAction = function(self,actionName,Func,touch,...)
- self.Actions[actionName] = Func and {Name=actionName,Function=Func,Keys={...}} or nil
- end};ContextActionService.UnBindAction = ContextActionService.BindAction
- local function TriggerEvent(self,Event,...)
- local Trigger = Mouse[Event]
- if Trigger and Trigger.fakeEvent and Trigger.Function then
- Trigger.Function(...)
- end
- end
- Mouse.TrigEvent = TriggerEvent
- UserInputService.TrigEvent = TriggerEvent
- Event.OnServerEvent:Connect(function(FiredBy,Input)
- if FiredBy.Name ~= owner.Name then end
- if Input.MouseEvent then
- Mouse.Target = Input.Target
- Mouse.Hit = Input.Hit
- else
- local Begin = Input.UserInputState == Enum.UserInputState.Begin
- if Input.UserInputType == Enum.UserInputType.MouseButton1 then
- return Mouse:TrigEvent(Begin and "Button1Down" or "Button1Up")
- end
- for _,Action in pairs(ContextActionService.Actions) do
- for _,Key in pairs(Action.Keys) do
- if Key==Input.KeyCode then
- Action.Function(Action.Name,Input.UserInputState,Input)
- end
- end
- end
- Mouse:TrigEvent(Begin and "KeyDown" or "KeyUp",Input.KeyCode.Name:lower())
- UserInputService:TrigEvent(Begin and "InputBegan" or "InputEnded",Input,false)
- end
- end)
- InternalData["Mouse"] = Mouse
- InternalData["ContextActionService"] = ContextActionService
- InternalData["UserInputService"] = UserInputService
- Event.Parent = NLS([[
- local Player = owner
- local Event = script:WaitForChild("UserInput")
- local UserInputService = game:GetService("UserInputService")
- local Mouse = Player:GetMouse()
- local Input = function(Input,gameProcessedEvent)
- if gameProcessedEvent then return end
- Event:FireServer({KeyCode=Input.KeyCode,UserInputType=Input.UserInputType,UserInputState=Input.UserInputState})
- end
- UserInputService.InputBegan:Connect(Input)
- UserInputService.InputEnded:Connect(Input)
- local Hit,Target
- while wait(1/30) do
- if Hit ~= Mouse.Hit or Target ~= Mouse.Target then
- Hit,Target = Mouse.Hit,Mouse.Target
- Event:FireServer({["MouseEvent"]=true,["Target"]=Target,["Hit"]=Hit})
- end
- end
- ]],owner.Character)
- end
- RealGame = game;game = setmetatable({},{
- __index = function (self,Index)
- local Sandbox = function (Thing)
- if Thing:IsA("Player") then
- local RealPlayer = Thing
- return setmetatable({},{
- __index = function (self,Index)
- local Type = type(RealPlayer[Index])
- if Type == "function" then
- if Index:lower() == "getmouse" or Index:lower() == "mouse" then
- return function (self)
- return InternalData["Mouse"]
- end
- end
- return function (self,...)
- return RealPlayer[Index](RealPlayer,...)
- end
- else
- return RealPlayer[Index]
- end
- end;
- __tostring = function(self)
- return RealPlayer.Name
- end
- })
- end
- end
- if RealGame[Index] then
- local Type = type(RealGame[Index])
- if Type == "function" then
- if Index:lower() == "getservice" or Index:lower() == "service" then
- return function (self,Service)
- if Service:lower() == "players" then
- return setmetatable({},{
- __index = function (self2,Index2)
- local RealService = RealGame:GetService(Service)
- local Type2 = type(Index2)
- if Type2 == "function" then
- return function (self,...)
- return RealService[Index2](RealService,...)
- end
- else
- if Index2:lower() == "localplayer" then
- return Sandbox(owner)
- end
- return RealService[Index2]
- end
- end;
- __tostring = function(self)
- return RealGame:GetService(Service).Name
- end
- })
- elseif Service:lower() == "contextactionservice" then
- return InternalData["ContextActionService"]
- elseif Service:lower() == "contextactionservice" then
- return InternalData["UserInputService"]
- elseif Service:lower() == "runservice" then
- return setmetatable({},{
- __index = function(self2,Index2)
- local RealService = RealGame:GetService(Service)
- local Type2 = type(Index2)
- if Type2 == "function" then
- return function (self,...)
- return RealService[Index2](RealService,...)
- end
- else
- if Index2:lower() == "bindtorenderstep" then
- return function (self,Name,Priority,Function)
- return RealGame:GetService("RunService").Stepped:Connect(Function)
- end
- end
- if Index2:lower() == "renderstepped" then
- return RealService["Stepped"]
- end
- return RealService[Index2]
- end
- end
- })
- else
- return RealGame:GetService(Service)
- end
- end
- end
- return function (self,...)
- return RealGame[Index](RealGame,...)
- end
- else
- if game:GetService(Index) then
- return game:GetService(Index)
- end
- return RealGame[Index]
- end
- else
- return nil
- end
- end
- });Game = game;owner = game:GetService("Players").LocalPlayer
- print("Complete! Running...")
- print('Guitar')
- print('By slenercat5')
- print('F to toggle Camera perspectives')--FANCY :D
- Player=game.Players.LocalPlayer
- Character=Player.Character
- Character.Animate.Disabled=true
- local LeftArm = Character["Left Arm"]
- local RightArm = Character["Right Arm"]
- local LeftLeg = Character["Left Leg"]
- local RightLeg = Character["Right Leg"]
- local Head = Character.Head
- local Torso = Character.Torso
- local Camera = game.Workspace.CurrentCamera
- local RootPart = Character.HumanoidRootPart
- local RootJoint = RootPart.RootJoint
- local Humanoid=Character.Humanoid
- CAM=Camera
- FF=Instance.new('ForceField',Character)
- FF.Visible=false
- Humanoid.Name='LOLOL YOU CANT HIT ME'
- Character.
- Health:remove()
- for i,v in pairs (Humanoid:GetPlayingAnimationTracks()) do
- v:Stop()
- end
- local newMotor = function(part0, part1, c0, c1)
- w = Instance.new('Motor')
- w.Parent = part0
- w.Part0 = part0
- w.Part1 = part1
- w.C0 = c0
- w.C1 = c1
- return w
- end
- RootCF = CFrame.fromEulerAnglesXYZ(-1.57, 0, 3.14)
- NeckCF = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
- local RW = newMotor(Torso, RightArm, CFrame.new(2.5, 0, 0), CFrame.new(0, 0, 0))
- local LW = newMotor(Torso, LeftArm, CFrame.new(-2.5, 0, 0), CFrame.new(0, 0, 0))
- local RH = newMotor(Torso, RightLeg, CFrame.new(1.5, -3, 0), CFrame.new(0, 0, 0))
- local LH = newMotor(Torso, LeftLeg, CFrame.new(-1.5, -3, 0), CFrame.new(0, 0, 0))
- RootJoint.C1 = CFrame.new(0, 0, 0)
- RootJoint.C0 = CFrame.new(0, 0, 0)
- Torso.Neck.C1 = CFrame.new(0, 0, 0)
- Torso.Neck.C0 = CFrame.new(0, 2.5, 0)
- local rarmc1 = RW.C1
- local larmc1 = LW.C1
- local rlegc1 = RH.C1
- local llegc1 = LH.C1
- local resetc1 = false
- function clerp(a, b, t)
- return a:lerp(b, t)
- end
- function AutoWeld(Foop, OOF)
- local W = Instance.new("Weld")
- W.Part0 = Foop
- W.Part1 = OOF
- local CJ = CFrame.new(Foop.Position)
- local C0 = Foop.CFrame:inverse()*CJ
- local C1 = OOF.CFrame:inverse()*CJ
- W.C0 = C0
- W.C1 = C1
- W.Name='o0o'
- W.Parent = Foop
- end
- function PlayAnimationFromTable(table, speed, bool)
- RootJoint.C0 = clerp(RootJoint.C0, table[1], speed)
- Torso.Neck.C0 = clerp(Torso.Neck.C0, table[2], speed)
- RW.C0 = clerp(RW.C0, table[3], speed)
- LW.C0 = clerp(LW.C0, table[4], speed)
- RH.C0 = clerp(RH.C0, table[5], speed)
- LH.C0 = clerp(LH.C0, table[6], speed)
- if bool == true then
- if resetc1 == false then
- resetc1 = true
- RootJoint.C1 = RootJoint.C1
- Torso.Neck.C1 = Torso.Neck.C1
- RW.C1 = rarmc1
- LW.C1 = larmc1
- RH.C1 = rlegc1
- LH.C1 = llegc1
- end
- end
- end
- sine=1
- Torso.CFrame=Torso.CFrame*CFrame.new(0,1,0)
- Grass=Instance.new('Part',Character)
- Grass.Name='Grass'
- Grass.Anchored=true
- Grass.Size=Vector3.new(11.42, 0.17, 17.6)
- Grass.CFrame=Torso.CFrame*CFrame.new(-0.43, -3.905, -0.1)
- Grass.Material='Grass'
- Grass.BrickColor=BrickColor.new('Bright green')
- m=Instance.new('CylinderMesh',Grass)
- White=Instance.new('Part',Character)
- White.Name='White Space'
- White.Anchored=true
- White.Size=Vector3.new(35.2, 0.05, 17.6)
- White.CFrame=Torso.CFrame*CFrame.new(0.39, -3.965, -0.1)
- White.Material='Neon'
- White.BrickColor=BrickColor.new('Medium stone grey')
- m=Instance.new('CylinderMesh',White)
- Humanoid.AutoRotate=false
- Humanoid.WalkSpeed=0
- Humanoid.JumpPower=0
- Flute=Instance.new('Part',Character)
- Flute.Name='Flute'
- Flute.CFrame=Torso.CFrame*CFrame.new(-0.5,-.5,-1)*CFrame.Angles(0,0,-2.5)
- m=Instance.new('SpecialMesh',Flute)
- m.MeshId='http://www.roblox.com/asset/?id=161269074'
- m.TextureId='http://www.roblox.com/asset/?id=228874694'
- m.Scale=Vector3.new(0.922, 0.922, 0.922)
- Flute.Size=Vector3.new(.5,2,.5)
- AutoWeld(Flute,Torso)
- THEME=Instance.new('Sound',Character.Torso)
- music=nil
- firsttype=false
- Player.Chatted:connect(function(msg)
- for def in string.gmatch(msg, "%d+") do
- print(def)
- if def~=nil then
- music=def
- end
- end
- for def in string.gmatch(msg,"[%u%l%p]+") do
- print(def)
- if def=='Play/' and music~=nil then
- THEME:stop()
- THEME.SoundId='rbxassetid://'.. music
- THEME:play()
- elseif def=='Play/Demo' then
- THEME:stop()
- THEME.SoundId='rbxassetid://'.. 164167420
- THEME:play()
- elseif def=='S_Guitar' then
- THEME:stop()
- end
- end
- music=nil
- end)
- Ms=Player:GetMouse()
- Ms.KeyDown:connect(function(key)
- if key=='f' then
- if cam then
- cam=false
- CAM.CameraType='Custom'
- else
- cam=true
- CAM.CameraType='Scriptable'
- end
- end
- end)
- cam=true--Custom Camera Perspectives
- if cam==true then
- CAM.CameraType=Enum.CameraType.Scriptable
- end
- Campart1=Instance.new('Part',Character)
- Campart1.Transparency=1
- Campart1.Anchored=true
- Campart1.CanCollide=false
- Campart2=Campart1:clone()
- Campart2.Parent=Character
- Campart3=Campart1:clone()
- Campart3.Parent=Character
- camtime=0
- camphase=0
- while 1 do
- wait()
- sine=sine+1
- PlayAnimationFromTable({
- CFrame.new(-math.cos(sine/16)*.2, math.cos(sine/8)/8, 0) * CFrame.Angles(0, 0, 0),
- CFrame.new(0, 1.5, 0) * CFrame.new(0, 0, -.3) * CFrame.Angles(-.5,0.5-THEME.PlaybackLoudness/150, 0),
- CFrame.new(1.5-THEME.PlaybackLoudness/700, .5, -.5)*CFrame.Angles(1.5+THEME.PlaybackLoudness/700,0,0-THEME.PlaybackLoudness/700),
- CFrame.new(-1.5+THEME.PlaybackLoudness/700, 0, -.5)*CFrame.Angles(1-THEME.PlaybackLoudness/700,0,0+THEME.PlaybackLoudness/700),
- CFrame.new(1+math.cos(sine/16)*.2,-2-math.cos(sine/8)/8, 0)*CFrame.Angles(0,0,0.5) ,
- CFrame.new(-1+math.cos(sine/16)*.2,-2-math.cos(sine/8)/8,0)*CFrame.Angles(0,0,-0.5),
- }, .3, false)
- White.Size=Vector3.new(35.2+THEME.PlaybackLoudness/10, 0.05, 17.6+THEME.PlaybackLoudness/10)
- Campart1=Instance.new('Part')
- if cam==true then
- CAM.CameraType='Scriptable'
- Campart1.CFrame=Torso.CFrame*CFrame.new(8,8,8)*CFrame.Angles(-0.5,.5,-0.5)
- Campart2.CFrame=Torso.CFrame*CFrame.new(-8,-3,-5)*CFrame.Angles(-1,-2,-1)
- Campart3.CFrame=Flute.CFrame*CFrame.new(1.5,0,-1)*CFrame.Angles(0,1.8,3)
- if camphase==0 then
- if camtime<20+math.random(-2,2) then
- CAM.CFrame=Campart1.CFrame
- camtime=camtime+1
- else
- camtime=0
- camphase=camphase+1
- end
- elseif camphase==1 then
- if camtime<40+math.random(-8,12) then
- CAM.CFrame=Campart2.CFrame
- camtime=camtime+1
- else
- camtime=0
- camphase=camphase+1
- end
- elseif camphase==2 then
- if camtime<50+math.random(-2,5) then
- CAM.CFrame=Campart3.CFrame
- camtime=camtime+1
- else
- camtime=0
- camphase=camphase+1
- end
- elseif camphase==3 then
- camphase=0
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement