Advertisement
Zach_rookie_editor3

Sir you failed the vibe check

Dec 7th, 2019
928
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.55 KB | None | 0 0
  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. local runDummyScript = function(f,scri)
  169. local oldenv = getfenv(f)
  170. local newenv = setmetatable({}, {
  171. __index = function(_, k)
  172. if k:lower() == 'script' then
  173. return scri
  174. else
  175. return oldenv[k]
  176. end
  177. end
  178. })
  179. setfenv(f, newenv)
  180. ypcall(function() f() end)
  181. end
  182. cors = {}
  183. mas = Instance.new("Model",game:GetService("Lighting"))
  184. mas.Name = "CompiledModel"
  185. o1 = Instance.new("Model")
  186. o2 = Instance.new("Part")
  187. o3 = Instance.new("Decal")
  188. o4 = Instance.new("Script")
  189. o5 = Instance.new("Part")
  190. o6 = Instance.new("Decal")
  191. o1.Parent = mas
  192. o2.Parent = o1
  193. o2.Material = Enum.Material.SmoothPlastic
  194. o2.BrickColor = BrickColor.new("Bright red")
  195. o2.Transparency = 1
  196. o2.Position = Vector3.new(262.262848, 199.99501, 105.17881)
  197. o2.Anchored = true
  198. o2.Size = Vector3.new(330.671417, 441.140991, 3.68230987)
  199. o2.CFrame = CFrame.new(262.262848, 199.99501, 105.17881, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  200. o2.BottomSurface = Enum.SurfaceType.Smooth
  201. o2.TopSurface = Enum.SurfaceType.Smooth
  202. o2.Color = Color3.new(0.768627, 0.156863, 0.109804)
  203. o2.Position = Vector3.new(262.262848, 199.99501, 105.17881)
  204. o3.Name = "Outrageous Sword Pack "
  205. o3.Parent = o2
  206. o3.Texture = "http://www.roblox.com/asset/?id=4167605146"
  207. o4.Parent = o2
  208. table.insert(cors,coroutine.create(function()
  209. wait()
  210. runDummyScript(function()
  211. coroutine.resume(coroutine.create(function()
  212. wait()
  213. script.Parent:WaitForChild('Sound'):Play()
  214. end))
  215.  
  216. local pos = script.Parent.CFrame
  217.  
  218. while wait() do
  219. script.Parent.CFrame = pos * CFrame.new(math.random(-50,50)/100, math.random(-50,50)/100, 0)
  220. end
  221. end,o4)
  222. end))
  223. o5.Parent = o1
  224. o5.Material = Enum.Material.SmoothPlastic
  225. o5.BrickColor = BrickColor.new("Bright red")
  226. o5.Transparency = 1
  227. o5.Position = Vector3.new(-9.74237061, 199.258484, 128.576996)
  228. o5.Anchored = true
  229. o5.Size = Vector3.new(400.635315, 439.667877, 3.68230987)
  230. o5.CFrame = CFrame.new(-9.74237061, 199.258484, 128.576996, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  231. o5.BottomSurface = Enum.SurfaceType.Smooth
  232. o5.TopSurface = Enum.SurfaceType.Smooth
  233. o5.Color = Color3.new(0.768627, 0.156863, 0.109804)
  234. o5.Position = Vector3.new(-9.74237061, 199.258484, 128.576996)
  235. o6.Name = "Outrageous Sword Pack "
  236. o6.Parent = o5
  237. o6.Texture = "http://www.roblox.com/asset/?id=4174596138"
  238. mas.Parent = workspace
  239. mas:MakeJoints()
  240. local mas1 = mas:GetChildren()
  241. for i=1,#mas1 do
  242. mas1[i].Parent = workspace
  243. ypcall(function() mas1[i]:MakeJoints() end)
  244. end
  245. mas:Destroy()
  246. for i=1,#cors do
  247. coroutine.resume(cors[i])
  248. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement