SHOW:
|
|
- or go back to the newest paste.
| 1 | -- This script has been converted to FE by iPxter | |
| 2 | ||
| 3 | ||
| 4 | if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
| |
| 5 | local Player,Mouse,mouse,UserInputService,ContextActionService = owner | |
| 6 | do | |
| 7 | print("FE Compatibility code by Mokiros | Translated to FE by iPxter")
| |
| 8 | script.Parent = Player.Character | |
| 9 | ||
| 10 | --RemoteEvent for communicating | |
| 11 | local Event = Instance.new("RemoteEvent")
| |
| 12 | Event.Name = "UserInput_Event" | |
| 13 | ||
| 14 | --Fake event to make stuff like Mouse.KeyDown work | |
| 15 | local function fakeEvent() | |
| 16 | local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
| |
| 17 | t.connect = t.Connect | |
| 18 | return t | |
| 19 | end | |
| 20 | ||
| 21 | --Creating fake input objects with fake variables | |
| 22 | local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
| |
| 23 | local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
| |
| 24 | local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
| |
| 25 | CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
| |
| 26 | end} | |
| 27 | --Merged 2 functions into one by checking amount of arguments | |
| 28 | CAS.UnbindAction = CAS.BindAction | |
| 29 | ||
| 30 | --This function will trigger the events that have been :Connect()'ed | |
| 31 | local function te(self,ev,...) | |
| 32 | local t = m[ev] | |
| 33 | if t and t._fakeEvent and t.Function then | |
| 34 | t.Function(...) | |
| 35 | end | |
| 36 | end | |
| 37 | m.TrigEvent = te | |
| 38 | UIS.TrigEvent = te | |
| 39 | ||
| 40 | Event.OnServerEvent:Connect(function(plr,io) | |
| 41 | if plr~=Player then return end | |
| 42 | if io.isMouse then | |
| 43 | m.Target = io.Target | |
| 44 | m.Hit = io.Hit | |
| 45 | else | |
| 46 | local b = io.UserInputState == Enum.UserInputState.Begin | |
| 47 | if io.UserInputType == Enum.UserInputType.MouseButton1 then | |
| 48 | return m:TrigEvent(b and "Button1Down" or "Button1Up") | |
| 49 | end | |
| 50 | for _,t in pairs(CAS.Actions) do | |
| 51 | for _,k in pairs(t.Keys) do | |
| 52 | if k==io.KeyCode then | |
| 53 | t.Function(t.Name,io.UserInputState,io) | |
| 54 | end | |
| 55 | end | |
| 56 | end | |
| 57 | m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower()) | |
| 58 | UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false) | |
| 59 | end | |
| 60 | end) | |
| 61 | Event.Parent = NLS([==[ | |
| 62 | local Player = game:GetService("Players").LocalPlayer
| |
| 63 | local Event = script:WaitForChild("UserInput_Event")
| |
| 64 | ||
| 65 | local UIS = game:GetService("UserInputService")
| |
| 66 | local input = function(io,a) | |
| 67 | if a then return end | |
| 68 | --Since InputObject is a client-side instance, we create and pass table instead | |
| 69 | Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
| |
| 70 | end | |
| 71 | UIS.InputBegan:Connect(input) | |
| 72 | UIS.InputEnded:Connect(input) | |
| 73 | ||
| 74 | local Mouse = Player:GetMouse() | |
| 75 | local h,t | |
| 76 | --Give the server mouse data 30 times every second, but only if the values changed | |
| 77 | --If player is not moving their mouse, client won't fire events | |
| 78 | while wait(1/30) do | |
| 79 | if h~=Mouse.Hit or t~=Mouse.Target then | |
| 80 | h,t=Mouse.Hit,Mouse.Target | |
| 81 | Event:FireServer({isMouse=true,Target=t,Hit=h})
| |
| 82 | end | |
| 83 | end]==],Player.Character) | |
| 84 | Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS | |
| 85 | end | |
| 86 | ||
| 87 | ||
| 88 | print('Guitar')
| |
| 89 | print('By slenercat5')
| |
| 90 | print('F to toggle Camera perspectives')--FANCY :D
| |
| 91 | Player=owner | |
| 92 | Character=Player.Character | |
| 93 | Character.Animate.Disabled=true | |
| 94 | local LeftArm = Character["Left Arm"] | |
| 95 | local RightArm = Character["Right Arm"] | |
| 96 | local LeftLeg = Character["Left Leg"] | |
| 97 | local RightLeg = Character["Right Leg"] | |
| 98 | local Head = Character.Head | |
| 99 | local Torso = Character.Torso | |
| 100 | local Camera = game.Workspace.CurrentCamera | |
| 101 | local RootPart = Character.HumanoidRootPart | |
| 102 | local RootJoint = RootPart.RootJoint | |
| 103 | local Humanoid=Character.Humanoid | |
| 104 | CAM=Camera | |
| 105 | FF=Instance.new('ForceField',Character)
| |
| 106 | FF.Visible=false | |
| 107 | Humanoid.Name='LOLOL YOU CANT HIT ME' | |
| 108 | Character. | |
| 109 | Health:remove() | |
| 110 | for i,v in pairs (Humanoid:GetPlayingAnimationTracks()) do | |
| 111 | v:Stop() | |
| 112 | end | |
| 113 | ||
| 114 | local newMotor = function(part0, part1, c0, c1) | |
| 115 | w = Instance.new('Motor')
| |
| 116 | w.Parent = part0 | |
| 117 | w.Part0 = part0 | |
| 118 | w.Part1 = part1 | |
| 119 | w.C0 = c0 | |
| 120 | w.C1 = c1 | |
| 121 | ||
| 122 | return w | |
| 123 | end | |
| 124 | ||
| 125 | ||
| 126 | ||
| 127 | ||
| 128 | RootCF = CFrame.fromEulerAnglesXYZ(-1.57, 0, 3.14) | |
| 129 | NeckCF = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0) | |
| 130 | ||
| 131 | local RW = newMotor(Torso, RightArm, CFrame.new(2.5, 0, 0), CFrame.new(0, 0, 0)) | |
| 132 | local LW = newMotor(Torso, LeftArm, CFrame.new(-2.5, 0, 0), CFrame.new(0, 0, 0)) | |
| 133 | local RH = newMotor(Torso, RightLeg, CFrame.new(1.5, -3, 0), CFrame.new(0, 0, 0)) | |
| 134 | local LH = newMotor(Torso, LeftLeg, CFrame.new(-1.5, -3, 0), CFrame.new(0, 0, 0)) | |
| 135 | RootJoint.C1 = CFrame.new(0, 0, 0) | |
| 136 | RootJoint.C0 = CFrame.new(0, 0, 0) | |
| 137 | Torso.Neck.C1 = CFrame.new(0, 0, 0) | |
| 138 | Torso.Neck.C0 = CFrame.new(0, 2.5, 0) | |
| 139 | ||
| 140 | local rarmc1 = RW.C1 | |
| 141 | local larmc1 = LW.C1 | |
| 142 | local rlegc1 = RH.C1 | |
| 143 | local llegc1 = LH.C1 | |
| 144 | ||
| 145 | local resetc1 = false | |
| 146 | ||
| 147 | function clerp(a, b, t) | |
| 148 | return a:lerp(b, t) | |
| 149 | end | |
| 150 | function AutoWeld(Foop, OOF) | |
| 151 | local W = Instance.new("Weld")
| |
| 152 | W.Part0 = Foop | |
| 153 | W.Part1 = OOF | |
| 154 | local CJ = CFrame.new(Foop.Position) | |
| 155 | local C0 = Foop.CFrame:inverse()*CJ | |
| 156 | local C1 = OOF.CFrame:inverse()*CJ | |
| 157 | W.C0 = C0 | |
| 158 | W.C1 = C1 | |
| 159 | W.Name='o0o' | |
| 160 | W.Parent = Foop | |
| 161 | ||
| 162 | end | |
| 163 | ||
| 164 | ||
| 165 | ||
| 166 | function PlayAnimationFromTable(table, speed, bool) | |
| 167 | RootJoint.C0 = clerp(RootJoint.C0, table[1], speed) | |
| 168 | Torso.Neck.C0 = clerp(Torso.Neck.C0, table[2], speed) | |
| 169 | RW.C0 = clerp(RW.C0, table[3], speed) | |
| 170 | LW.C0 = clerp(LW.C0, table[4], speed) | |
| 171 | RH.C0 = clerp(RH.C0, table[5], speed) | |
| 172 | LH.C0 = clerp(LH.C0, table[6], speed) | |
| 173 | if bool == true then | |
| 174 | if resetc1 == false then | |
| 175 | resetc1 = true | |
| 176 | RootJoint.C1 = RootJoint.C1 | |
| 177 | Torso.Neck.C1 = Torso.Neck.C1 | |
| 178 | RW.C1 = rarmc1 | |
| 179 | LW.C1 = larmc1 | |
| 180 | RH.C1 = rlegc1 | |
| 181 | LH.C1 = llegc1 | |
| 182 | end | |
| 183 | end | |
| 184 | end | |
| 185 | sine=1 | |
| 186 | ||
| 187 | Torso.CFrame=Torso.CFrame*CFrame.new(0,1,0) | |
| 188 | ||
| 189 | ||
| 190 | Grass=Instance.new('Part',Character)
| |
| 191 | Grass.Name='Grass' | |
| 192 | Grass.Anchored=true | |
| 193 | Grass.Size=Vector3.new(11.42, 0.17, 17.6) | |
| 194 | Grass.CFrame=Torso.CFrame*CFrame.new(-0.43, -3.905, -0.1) | |
| 195 | Grass.Material='Grass' | |
| 196 | Grass.BrickColor=BrickColor.new('Bright green')
| |
| 197 | m=Instance.new('CylinderMesh',Grass)
| |
| 198 | White=Instance.new('Part',Character)
| |
| 199 | White.Name='White Space' | |
| 200 | White.Anchored=true | |
| 201 | White.Size=Vector3.new(35.2, 0.05, 17.6) | |
| 202 | White.CFrame=Torso.CFrame*CFrame.new(0.39, -3.965, -0.1) | |
| 203 | White.Material='Neon' | |
| 204 | White.BrickColor=BrickColor.new('Medium stone grey')
| |
| 205 | m=Instance.new('CylinderMesh',White)
| |
| 206 | ||
| 207 | ||
| 208 | Humanoid.AutoRotate=false | |
| 209 | Humanoid.WalkSpeed=0 | |
| 210 | Humanoid.JumpPower=0 | |
| 211 | ||
| 212 | Flute=Instance.new('Part',Character)
| |
| 213 | Flute.Name='Flute' | |
| 214 | Flute.CFrame=Torso.CFrame*CFrame.new(-0.5,-.5,-1)*CFrame.Angles(0,0,-2.5) | |
| 215 | m=Instance.new('SpecialMesh',Flute)
| |
| 216 | m.MeshId='http://www.roblox.com/asset/?id=161269074' | |
| 217 | m.TextureId='http://www.roblox.com/asset/?id=228874694' | |
| 218 | m.Scale=Vector3.new(0.922, 0.922, 0.922) | |
| 219 | Flute.Size=Vector3.new(.5,2,.5) | |
| 220 | ||
| 221 | AutoWeld(Flute,Torso) | |
| 222 | THEME=Instance.new('Sound',Character.Torso)
| |
| 223 | music=nil | |
| 224 | firsttype=false | |
| 225 | Player.Chatted:connect(function(msg) | |
| 226 | for def in string.gmatch(msg, "%d+") do | |
| 227 | print(def) | |
| 228 | ||
| 229 | if def~=nil then | |
| 230 | music=def | |
| 231 | end | |
| 232 | end | |
| 233 | ||
| 234 | for def in string.gmatch(msg,"[%u%l%p]+") do | |
| 235 | print(def) | |
| 236 | if def=='Play/' and music~=nil then | |
| 237 | THEME:stop() | |
| 238 | THEME.SoundId='rbxassetid://'.. music | |
| 239 | THEME:play() | |
| 240 | elseif def=='Play/Demo' then | |
| 241 | THEME:stop() | |
| 242 | THEME.SoundId='rbxassetid://'.. 164167420 | |
| 243 | THEME:play() | |
| 244 | elseif def=='S_Guitar' then | |
| 245 | THEME:stop() | |
| 246 | end | |
| 247 | end | |
| 248 | music=nil | |
| 249 | end) | |
| 250 | if key=='f' then | |
| 251 | if cam then | |
| 252 | cam=false | |
| 253 | CAM.CameraType='Custom' | |
| 254 | else | |
| 255 | cam=true | |
| 256 | CAM.CameraType='Scriptable' | |
| 257 | end | |
| 258 | end | |
| 259 | end | |
| 260 | ||
| 261 | ||
| 262 | cam=true--Custom Camera Perspectives | |
| 263 | if cam==true then | |
| 264 | CAM.CameraType=Enum.CameraType.Scriptable | |
| 265 | ||
| 266 | end | |
| 267 | Campart1=Instance.new('Part',Character)
| |
| 268 | Campart1.Transparency=1 | |
| 269 | Campart1.Anchored=true | |
| 270 | Campart1.CanCollide=false | |
| 271 | Campart2=Campart1:clone() | |
| 272 | Campart2.Parent=Character | |
| 273 | Campart3=Campart1:clone() | |
| 274 | Campart3.Parent=Character | |
| 275 | ||
| 276 | camtime=0 | |
| 277 | camphase=0 | |
| 278 | ||
| 279 | while 1 do | |
| 280 | wait() | |
| 281 | sine=sine+1 | |
| 282 | PlayAnimationFromTable({
| |
| 283 | CFrame.new(-math.cos(sine/16)*.2, math.cos(sine/8)/8, 0) * CFrame.Angles(0, 0, 0), | |
| 284 | CFrame.new(0, 1.5, 0) * CFrame.new(0, 0, -.3) * CFrame.Angles(-.5,0.5-THEME.PlaybackLoudness/150, 0), | |
| 285 | CFrame.new(1.5-THEME.PlaybackLoudness/700, .5, -.5)*CFrame.Angles(1.5+THEME.PlaybackLoudness/700,0,0-THEME.PlaybackLoudness/700), | |
| 286 | CFrame.new(-1.5+THEME.PlaybackLoudness/700, 0, -.5)*CFrame.Angles(1-THEME.PlaybackLoudness/700,0,0+THEME.PlaybackLoudness/700), | |
| 287 | CFrame.new(1+math.cos(sine/16)*.2,-2-math.cos(sine/8)/8, 0)*CFrame.Angles(0,0,0.5) , | |
| 288 | CFrame.new(-1+math.cos(sine/16)*.2,-2-math.cos(sine/8)/8,0)*CFrame.Angles(0,0,-0.5), | |
| 289 | }, .3, false) | |
| 290 | ||
| 291 | White.Size=Vector3.new(35.2+THEME.PlaybackLoudness/10, 0.05, 17.6+THEME.PlaybackLoudness/10) | |
| 292 | Campart1=Instance.new('Part')
| |
| 293 | if cam==true then | |
| 294 | CAM.CameraType='Scriptable' | |
| 295 | Campart1.CFrame=Torso.CFrame*CFrame.new(8,8,8)*CFrame.Angles(-0.5,.5,-0.5) | |
| 296 | Campart2.CFrame=Torso.CFrame*CFrame.new(-8,-3,-5)*CFrame.Angles(-1,-2,-1) | |
| 297 | Campart3.CFrame=Flute.CFrame*CFrame.new(1.5,0,-1)*CFrame.Angles(0,1.8,3) | |
| 298 | if camphase==0 then | |
| 299 | if camtime<20+math.random(-2,2) then | |
| 300 | CAM.CFrame=Campart1.CFrame | |
| 301 | camtime=camtime+1 | |
| 302 | else | |
| 303 | camtime=0 | |
| 304 | camphase=camphase+1 | |
| 305 | end | |
| 306 | elseif camphase==1 then | |
| 307 | if camtime<40+math.random(-8,12) then | |
| 308 | CAM.CFrame=Campart2.CFrame | |
| 309 | camtime=camtime+1 | |
| 310 | else | |
| 311 | camtime=0 | |
| 312 | camphase=camphase+1 | |
| 313 | end | |
| 314 | elseif camphase==2 then | |
| 315 | if camtime<50+math.random(-2,5) then | |
| 316 | CAM.CFrame=Campart3.CFrame | |
| 317 | camtime=camtime+1 | |
| 318 | else | |
| 319 | camtime=0 | |
| 320 | camphase=camphase+1 | |
| 321 | end | |
| 322 | ||
| 323 | elseif camphase==3 then | |
| 324 | camphase=0 | |
| 325 | end | |
| 326 | ||
| 327 | ||
| 328 | end | |
| 329 | end |