yougotoof

Untitled

Dec 22nd, 2018
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 15.85 KB | None | 0 0
  1. --https://github.com/Mokiros/roblox-FE-compatibility
  2. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  3. local Player,game,owner = owner,game
  4. local RealPlayer = Player
  5. do
  6. print("FE Compatibility code by Mokiros")
  7. local rp = RealPlayer
  8. script.Parent = rp.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,Functions={},Connect=function(self,f)table.insert(self.Functions,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(),Button2Up=fakeEvent(),Button2Down=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 then
  34. for _,f in pairs(t.Functions) do
  35. f(...)
  36. end
  37. end
  38. end
  39. m.TrigEvent = te
  40. UIS.TrigEvent = te
  41.  
  42. Event.OnServerEvent:Connect(function(plr,io)
  43. if plr~=rp then return end
  44. m.Target = io.Target
  45. m.Hit = io.Hit
  46. if not io.isMouse then
  47. local b = io.UserInputState == Enum.UserInputState.Begin
  48. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  49. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  50. end
  51. if io.UserInputType == Enum.UserInputType.MouseButton2 then
  52. return m:TrigEvent(b and "Button2Down" or "Button2Up")
  53. end
  54. for _,t in pairs(CAS.Actions) do
  55. for _,k in pairs(t.Keys) do
  56. if k==io.KeyCode then
  57. t.Function(t.Name,io.UserInputState,io)
  58. end
  59. end
  60. end
  61. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  62. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  63. end
  64. end)
  65. Event.Parent = NLS([==[
  66. local Player = game:GetService("Players").LocalPlayer
  67. local Event = script:WaitForChild("UserInput_Event")
  68.  
  69. local Mouse = Player:GetMouse()
  70. local UIS = game:GetService("UserInputService")
  71. local input = function(io,a)
  72. if a then return end
  73. --Since InputObject is a client-side instance, we create and pass table instead
  74. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  75. end
  76. UIS.InputBegan:Connect(input)
  77. UIS.InputEnded:Connect(input)
  78.  
  79. local h,t
  80. --Give the server mouse data 30 times every second, but only if the values changed
  81. --If player is not moving their mouse, client won't fire events
  82. while wait(1/30) do
  83. if h~=Mouse.Hit or t~=Mouse.Target then
  84. h,t=Mouse.Hit,Mouse.Target
  85. Event:FireServer({isMouse=true,Target=t,Hit=h})
  86. end
  87. end]==],Player.Character)
  88.  
  89. ----Sandboxed game object that allows the usage of client-side methods and services
  90. --Real game object
  91. local _rg = game
  92.  
  93. --Metatable for fake service
  94. local fsmt = {
  95. __index = function(self,k)
  96. local s = rawget(self,"_RealService")
  97. if s then
  98. return typeof(s[k])=="function"
  99. and function(_,...)return s[k](s,...)end or s[k]
  100. end
  101. end,
  102. __newindex = function(self,k,v)
  103. local s = rawget(self,"_RealService")
  104. if s then s[k]=v end
  105. end
  106. }
  107. local function FakeService(t,RealService)
  108. t._RealService = typeof(RealService)=="string" and _rg:GetService(RealService) or RealService
  109. return setmetatable(t,fsmt)
  110. end
  111.  
  112. --Fake game object
  113. local g = {
  114. GetService = function(self,s)
  115. return rawget(self,s) or _rg:GetService(s)
  116. end,
  117. Players = FakeService({
  118. LocalPlayer = FakeService({GetMouse=function(self)return m end},Player)
  119. },"Players"),
  120. UserInputService = FakeService(UIS,"UserInputService"),
  121. ContextActionService = FakeService(CAS,"ContextActionService"),
  122. RunService = FakeService({
  123. _btrs = {},
  124. RenderStepped = _rg:GetService("RunService").Heartbeat,
  125. BindToRenderStep = function(self,name,_,fun)
  126. self._btrs[name] = self.Heartbeat:Connect(fun)
  127. end,
  128. UnbindFromRenderStep = function(self,name)
  129. self._btrs[name]:Disconnect()
  130. end,
  131. },"RunService")
  132. }
  133. rawset(g.Players,"localPlayer",g.Players.LocalPlayer)
  134. g.service = g.GetService
  135. FakeService(g,game)
  136. --Changing owner to fake player object to support owner:GetMouse()
  137. game,owner = g,g.Players.LocalPlayer
  138. end
  139.  
  140. --Go to line 216 to put id of song
  141. o1 = Instance.new("Model")
  142. o1.Name = "Vest"
  143. o2 = Instance.new("Part")
  144. o2.Name = "Middle"
  145. o2.Parent = o1
  146. o2.BrickColor = BrickColor.new("Brick yellow")
  147. o2.Transparency = 1
  148. o2.Position = Vector3.new(0.139906004, 1.05800402, -11.1099901)
  149. o2.Anchored = true
  150. o2.CFrame = CFrame.new(0.139906004, 1.05800402, -11.1099901, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  151. o2.CanCollide = false
  152. o2.FormFactor = Enum.FormFactor.Symmetric
  153. o2.Size = Vector3.new(2, 2, 1)
  154. o2.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  155. o2.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  156. o2.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  157. o2.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  158. o2.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  159. o2.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  160. o2.Color = Color3.new(0.843137, 0.772549, 0.603922)
  161. o3 = Instance.new("Part")
  162. o3.Name = "Pack"
  163. o3.Parent = o1
  164. o3.BrickColor = BrickColor.new("Dark stone grey")
  165. o3.Position = Vector3.new(0.139907002, 1.07000601, -10.3049936)
  166. o3.Rotation = Vector3.new(-180, 0, -180)
  167. o3.Anchored = true
  168. o3.CFrame = CFrame.new(0.139907002, 1.07000601, -10.3049936, -1, 0, 0, 0, 1, 0, 0, 0, -1)
  169. o3.CanCollide = false
  170. o3.FormFactor = Enum.FormFactor.Custom
  171. o3.Size = Vector3.new(1.65999985, 1.80000019, 0.630000472)
  172. o3.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  173. o3.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  174. o3.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  175. o3.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  176. o3.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  177. o3.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  178. o3.Color = Color3.new(0.388235, 0.372549, 0.384314)
  179. o4 = Instance.new("Part")
  180. o4.Name = "Strap"
  181. o4.Parent = o1
  182. o4.BrickColor = BrickColor.new("Black")
  183. o4.Position = Vector3.new(0.66991502, 1.05500698, -11.1149797)
  184. o4.Anchored = true
  185. o4.CFrame = CFrame.new(0.66991502, 1.05500698, -11.1149797, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  186. o4.CanCollide = false
  187. o4.FormFactor = Enum.FormFactor.Custom
  188. o4.Size = Vector3.new(0.259999752, 2.11000037, 1.15000045)
  189. o4.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  190. o4.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  191. o4.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  192. o4.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  193. o4.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  194. o4.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  195. o4.Color = Color3.new(0.105882, 0.164706, 0.207843)
  196. o5 = Instance.new("Part")
  197. o5.Name = "Flap"
  198. o5.Parent = o1
  199. o5.BrickColor = BrickColor.new("Black")
  200. o5.Position = Vector3.new(0.139905006, 1.85000098, -10.2900219)
  201. o5.Anchored = true
  202. o5.CFrame = CFrame.new(0.139905006, 1.85000098, -10.2900219, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  203. o5.CanCollide = false
  204. o5.FormFactor = Enum.FormFactor.Custom
  205. o5.Size = Vector3.new(1.71999979, 0.400000006, 0.639999866)
  206. o5.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  207. o5.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  208. o5.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  209. o5.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  210. o5.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  211. o5.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  212. o5.Color = Color3.new(0.105882, 0.164706, 0.207843)
  213. o6 = Instance.new("Part")
  214. o6.Name = "Pocket"
  215. o6.Parent = o1
  216. o6.BrickColor = BrickColor.new("Black")
  217. o6.Position = Vector3.new(0.149883002, 0.860005975, -10.0399857)
  218. o6.Rotation = Vector3.new(-0, 0, -90)
  219. o6.Anchored = true
  220. o6.CFrame = CFrame.new(0.149883002, 0.860005975, -10.0399857, 0, 1, 0, -1, 0, 0, 0, 0, 1)
  221. o6.CanCollide = false
  222. o6.FormFactor = Enum.FormFactor.Custom
  223. o6.Size = Vector3.new(0.600000024, 0.800000131, 0.200000003)
  224. o6.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  225. o6.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  226. o6.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  227. o6.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  228. o6.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  229. o6.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  230. o6.Color = Color3.new(0.105882, 0.164706, 0.207843)
  231. o7 = Instance.new("Part")
  232. o7.Name = "Pocket"
  233. o7.Parent = o1
  234. o7.BrickColor = BrickColor.new("Black")
  235. o7.Position = Vector3.new(0.139600992, 1.10000801, -10.3099718)
  236. o7.Rotation = Vector3.new(-90, 90, 0)
  237. o7.Anchored = true
  238. o7.CFrame = CFrame.new(0.139600992, 1.10000801, -10.3099718, 0, 0, 1, -1, 0, 0, 0, -1, 0)
  239. o7.CanCollide = false
  240. o7.FormFactor = Enum.FormFactor.Custom
  241. o7.Size = Vector3.new(0.600000024, 0.400000155, 1.70000005)
  242. o7.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  243. o7.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  244. o7.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  245. o7.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  246. o7.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  247. o7.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  248. o7.Color = Color3.new(0.105882, 0.164706, 0.207843)
  249. o8 = Instance.new("Part")
  250. o8.Name = "Strap"
  251. o8.Parent = o1
  252. o8.BrickColor = BrickColor.new("Black")
  253. o8.Position = Vector3.new(-0.37014699, 1.05500698, -11.1149921)
  254. o8.Anchored = true
  255. o8.CFrame = CFrame.new(-0.37014699, 1.05500698, -11.1149921, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  256. o8.CanCollide = false
  257. o8.FormFactor = Enum.FormFactor.Custom
  258. o8.Size = Vector3.new(0.259999752, 2.11000037, 1.15000045)
  259. o8.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  260. o8.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  261. o8.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  262. o8.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  263. o8.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  264. o8.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  265. o8.Color = Color3.new(0.105882, 0.164706, 0.207843)
  266. o9 = Instance.new("Part")
  267. o9.Parent = o1
  268. o9.BrickColor = BrickColor.new("Really black")
  269. o9.Reflectance = 0.10000000149012
  270. o9.Position = Vector3.new(0.173590899, 4.00173569, -9.98207664)
  271. o9.Rotation = Vector3.new(2.9181666e-009, -3.48279983e-008, -8.55249798e-019)
  272. o9.Anchored = true
  273. o9.CFrame = CFrame.new(0.173590899, 4.00173569, -9.98207664, 0.999998331, 1.49269007e-020, -6.07863204e-010, 1.49269007e-020, 1, -5.09317831e-011, -6.07863204e-010, -5.09317831e-011, 1.00000334)
  274. o9.FormFactor = Enum.FormFactor.Plate
  275. o9.Size = Vector3.new(2, 4.80000019, 2)
  276. o9.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  277. o9.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  278. o9.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  279. o9.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  280. o9.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  281. o9.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  282. o9.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
  283. o10 = Instance.new("SpecialMesh")
  284. o10.Parent = o9
  285. o10.Scale = Vector3.new(0.600000024, 1, 0.600000024)
  286. o10.MeshType = Enum.MeshType.Brick
  287. o11 = Instance.new("Part")
  288. o11.Parent = o1
  289. o11.BrickColor = BrickColor.new("Mid gray")
  290. o11.Reflectance = 0.20000000298023
  291. o11.Position = Vector3.new(0.173592806, 4.10173273, -11.1821489)
  292. o11.Rotation = Vector3.new(-180, 89.8953247, -90)
  293. o11.Anchored = true
  294. o11.CFrame = CFrame.new(0.173592806, 4.10173273, -11.1821489, -1.49269007e-020, 6.07863204e-010, 0.999998331, -1, 5.09317831e-011, 1.49269007e-020, 5.09317831e-011, -1.00000334, -6.07863204e-010)
  295. o11.FormFactor = Enum.FormFactor.Plate
  296. o11.Size = Vector3.new(1, 0.400000006, 2)
  297. o11.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  298. o11.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  299. o11.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  300. o11.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  301. o11.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  302. o11.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  303. o11.Color = Color3.new(0.803922, 0.803922, 0.803922)
  304. o12 = Instance.new("CylinderMesh")
  305. o12.Parent = o11
  306. o12.Offset = Vector3.new(0, -0.600000024, 0)
  307. o12.Scale = Vector3.new(0.5, 0.100000001, 0.5)
  308. o13 = Instance.new("Part")
  309. o13.Parent = o1
  310. o13.BrickColor = BrickColor.new("Mid gray")
  311. o13.Reflectance = 0.20000000298023
  312. o13.Position = Vector3.new(0.173592806, 5.60169125, -11.1821489)
  313. o13.Rotation = Vector3.new(1.40697509e-009, -89.8953247, -90)
  314. o13.Anchored = true
  315. o13.CFrame = CFrame.new(0.173592806, 5.60169125, -11.1821489, 1.49269007e-020, 6.07863204e-010, -0.999998331, 1, 5.09317831e-011, -1.49269007e-020, -5.09317831e-011, -1.00000334, 6.07863204e-010)
  316. o13.FormFactor = Enum.FormFactor.Plate
  317. o13.Size = Vector3.new(2, 0.400000006, 2)
  318. o13.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  319. o13.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  320. o13.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  321. o13.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  322. o13.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  323. o13.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  324. o13.Color = Color3.new(0.803922, 0.803922, 0.803922)
  325. o14 = Instance.new("CylinderMesh")
  326. o14.Parent = o13
  327. o14.Offset = Vector3.new(0, -0.600000024, 0)
  328. o14.Scale = Vector3.new(0.5, 0.100000001, 0.5)
  329. o15 = Instance.new("Part")
  330. o15.Parent = o1
  331. o15.BrickColor = BrickColor.new("Mid gray")
  332. o15.Reflectance = 0.20000000298023
  333. o15.Position = Vector3.new(0.173592806, 2.60173273, -11.1821489)
  334. o15.Rotation = Vector3.new(-180, 89.8953247, -90)
  335. o15.Anchored = true
  336. o15.CFrame = CFrame.new(0.173592806, 2.60173273, -11.1821489, -1.49269007e-020, 6.07863204e-010, 0.999998331, -1, 5.09317831e-011, 1.49269007e-020, 5.09317831e-011, -1.00000334, -6.07863204e-010)
  337. o15.FormFactor = Enum.FormFactor.Plate
  338. o15.Size = Vector3.new(2, 0.400000006, 2)
  339. o15.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  340. o15.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  341. o15.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  342. o15.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  343. o15.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  344. o15.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  345. o15.Color = Color3.new(0.803922, 0.803922, 0.803922)
  346. o16 = Instance.new("CylinderMesh")
  347. o16.Parent = o15
  348. o16.Offset = Vector3.new(0, -0.600000024, 0)
  349. o16.Scale = Vector3.new(0.5, 0.100000001, 0.5)
  350. myears = Instance.new('Sound')
  351. myears.Parent = game.Players.LocalPlayer.Character.Head
  352. myears.Looped = true
  353. myears.Name = "Ruski"
  354. myears.Playing = true
  355. myears.SoundId = "rbxassetid://598987226"
  356. myears.Volume = 100
  357. myears.TimePosition = 0
  358. local g = o1:clone()
  359. g.Parent = game.Players.LocalPlayer.Character
  360. local C = g:GetChildren()
  361. for i=1, #C do
  362. if C[i].className == "Part" then
  363. local W = Instance.new("Weld")
  364. W.Part0 = g.Middle
  365. W.Part1 = C[i]
  366. local CJ = CFrame.new(g.Middle.Position)
  367. local C0 = g.Middle.CFrame:inverse()*CJ
  368. local C1 = C[i].CFrame:inverse()*CJ
  369. W.C0 = C0
  370. W.C1 = C1
  371. W.Parent = g.Middle
  372. end
  373. local Y = Instance.new("Weld")
  374. Y.Part0 = game.Players.LocalPlayer.Character.Torso
  375. Y.Part1 = g.Middle
  376. Y.C0 = CFrame.new(0, 0, 0)
  377. Y.Parent = Y.Part0
  378. end
  379.  
  380. local h = g:GetChildren()
  381. for i = 1, # h do
  382. h[i].Anchored = false
  383. h[i].CanCollide = false
  384. end
Add Comment
Please, Sign In to add comment