Advertisement
1nubloku

vz

Oct 6th, 2019
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. print('Guitar')
  88. print('By slenercat5')
  89. print('F to toggle Camera perspectives')--FANCY :D
  90. Player=owner
  91. Character=Player.Character
  92. Character.Animate.Disabled=true
  93. local LeftArm = Character["Left Arm"]
  94. local RightArm = Character["Right Arm"]
  95. local LeftLeg = Character["Left Leg"]
  96. local RightLeg = Character["Right Leg"]
  97. local Head = Character.Head
  98. local Torso = Character.Torso
  99. local Camera = game.Workspace.CurrentCamera
  100. local RootPart = Character.HumanoidRootPart
  101. local RootJoint = RootPart.RootJoint
  102. local Humanoid=Character.Humanoid
  103. CAM=Camera
  104. FF=Instance.new('ForceField',Character)
  105. FF.Visible=false
  106. Humanoid.Name='LOLOL YOU CANT HIT ME'
  107. Character.
  108. Health:remove()
  109. for i,v in pairs (Humanoid:GetPlayingAnimationTracks()) do
  110. v:Stop()
  111. end
  112.  
  113. local newMotor = function(part0, part1, c0, c1)
  114. w = Instance.new('Motor')
  115. w.Parent = part0
  116. w.Part0 = part0
  117. w.Part1 = part1
  118. w.C0 = c0
  119. w.C1 = c1
  120.  
  121. return w
  122. end
  123.  
  124.  
  125.  
  126.  
  127. RootCF = CFrame.fromEulerAnglesXYZ(-1.57, 0, 3.14)
  128. NeckCF = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  129.  
  130. local RW = newMotor(Torso, RightArm, CFrame.new(2.5, 0, 0), CFrame.new(0, 0, 0))
  131. local LW = newMotor(Torso, LeftArm, CFrame.new(-2.5, 0, 0), CFrame.new(0, 0, 0))
  132. local RH = newMotor(Torso, RightLeg, CFrame.new(1.5, -3, 0), CFrame.new(0, 0, 0))
  133. local LH = newMotor(Torso, LeftLeg, CFrame.new(-1.5, -3, 0), CFrame.new(0, 0, 0))
  134. RootJoint.C1 = CFrame.new(0, 0, 0)
  135. RootJoint.C0 = CFrame.new(0, 0, 0)
  136. Torso.Neck.C1 = CFrame.new(0, 0, 0)
  137. Torso.Neck.C0 = CFrame.new(0, 2.5, 0)
  138.  
  139. local rarmc1 = RW.C1
  140. local larmc1 = LW.C1
  141. local rlegc1 = RH.C1
  142. local llegc1 = LH.C1
  143.  
  144. local resetc1 = false
  145.  
  146. function clerp(a, b, t)
  147. return a:lerp(b, t)
  148. end
  149. function AutoWeld(Foop, OOF)
  150. local W = Instance.new("Weld")
  151. W.Part0 = Foop
  152. W.Part1 = OOF
  153. local CJ = CFrame.new(Foop.Position)
  154. local C0 = Foop.CFrame:inverse()*CJ
  155. local C1 = OOF.CFrame:inverse()*CJ
  156. W.C0 = C0
  157. W.C1 = C1
  158. W.Name='o0o'
  159. W.Parent = Foop
  160.  
  161. end
  162.  
  163.  
  164.  
  165. function PlayAnimationFromTable(table, speed, bool)
  166. RootJoint.C0 = clerp(RootJoint.C0, table[1], speed)
  167. Torso.Neck.C0 = clerp(Torso.Neck.C0, table[2], speed)
  168. RW.C0 = clerp(RW.C0, table[3], speed)
  169. LW.C0 = clerp(LW.C0, table[4], speed)
  170. RH.C0 = clerp(RH.C0, table[5], speed)
  171. LH.C0 = clerp(LH.C0, table[6], speed)
  172. if bool == true then
  173. if resetc1 == false then
  174. resetc1 = true
  175. RootJoint.C1 = RootJoint.C1
  176. Torso.Neck.C1 = Torso.Neck.C1
  177. RW.C1 = rarmc1
  178. LW.C1 = larmc1
  179. RH.C1 = rlegc1
  180. LH.C1 = llegc1
  181. end
  182. end
  183. end
  184. sine=1
  185.  
  186. Torso.CFrame=Torso.CFrame*CFrame.new(0,1,0)
  187.  
  188.  
  189. Grass=Instance.new('Part',Character)
  190. Grass.Name='Grass'
  191. Grass.Anchored=true
  192. Grass.Size=Vector3.new(11.42, 0.17, 17.6)
  193. Grass.CFrame=Torso.CFrame*CFrame.new(-0.43, -3.905, -0.1)
  194. Grass.Material='Grass'
  195. Grass.BrickColor=BrickColor.new('Bright green')
  196. m=Instance.new('CylinderMesh',Grass)
  197. White=Instance.new('Part',Character)
  198. White.Name='White Space'
  199. White.Anchored=true
  200. White.Size=Vector3.new(35.2, 0.05, 17.6)
  201. White.CFrame=Torso.CFrame*CFrame.new(0.39, -3.965, -0.1)
  202. White.Material='Neon'
  203. White.BrickColor=BrickColor.new('Medium stone grey')
  204. m=Instance.new('CylinderMesh',White)
  205.  
  206.  
  207. Humanoid.AutoRotate=false
  208. Humanoid.WalkSpeed=0
  209. Humanoid.JumpPower=0
  210.  
  211. Flute=Instance.new('Part',Character)
  212. Flute.Name='Flute'
  213. Flute.CFrame=Torso.CFrame*CFrame.new(-0.5,-.5,-1)*CFrame.Angles(0,0,-2.5)
  214. m=Instance.new('SpecialMesh',Flute)
  215. m.MeshId='http://www.roblox.com/asset/?id=161269074'
  216. m.TextureId='http://www.roblox.com/asset/?id=228874694'
  217. m.Scale=Vector3.new(0.922, 0.922, 0.922)
  218. Flute.Size=Vector3.new(.5,2,.5)
  219.  
  220. AutoWeld(Flute,Torso)
  221. THEME=Instance.new('Sound',Character.Torso)
  222. music=nil
  223. firsttype=false
  224. Player.Chatted:connect(function(msg)
  225. for def in string.gmatch(msg, "%d+") do
  226. print(def)
  227.  
  228. if def~=nil then
  229. music=def
  230. end
  231. end
  232.  
  233. for def in string.gmatch(msg,"[%u%l%p]+") do
  234. print(def)
  235. if def=='Play/' and music~=nil then
  236. THEME:stop()
  237. THEME.SoundId='rbxassetid://'.. music
  238. THEME:play()
  239. elseif def=='Play/Demo' then
  240. THEME:stop()
  241. THEME.SoundId='rbxassetid://'.. 164167420
  242. THEME:play()
  243. elseif def=='S_Guitar' then
  244. THEME:stop()
  245. end
  246. end
  247. music=nil
  248. end)
  249. Ms.KeyDown:connect(function(key)
  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
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement