DaOMEGAa32

dfgfgd

Jul 9th, 2019
389
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.61 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 V2 by Mokiros")
  7. local RealPlayer = RealPlayer
  8. script.Parent = RealPlayer.Character
  9.  
  10. --Fake event to make stuff like Mouse.KeyDown work
  11. local Disconnect_Function = function(this)
  12. this[1].Functions[this[2]] = nil
  13. end
  14. local Disconnect_Metatable = {__index={disconnect=Disconnect_Function,Disconnect=Disconnect_Function}}
  15. local FakeEvent_Metatable = {__index={
  16. Connect = function(this,f)
  17. local i = tostring(math.random(0,10000))
  18. while this.Functions[i] do
  19. i = tostring(math.random(0,10000))
  20. end
  21. this.Functions[i] = f
  22. return setmetatable({this,i},Disconnect_Metatable)
  23. end
  24. }}
  25. FakeEvent_Metatable.__index.connect = FakeEvent_Metatable.__index.Connect
  26. local function fakeEvent()
  27. return setmetatable({Functions={}},FakeEvent_Metatable)
  28. end
  29.  
  30. --Creating fake input objects with fake variables
  31. local FakeMouse = {Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()}
  32. FakeMouse.keyUp = FakeMouse.KeyUp
  33. FakeMouse.keyDown = FakeMouse.KeyDown
  34. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  35. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  36. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  37. end}
  38. --Merged 2 functions into one by checking amount of arguments
  39. CAS.UnbindAction = CAS.BindAction
  40.  
  41. --This function will trigger the events that have been :Connect()'ed
  42. local function TriggerEvent(self,ev,...)
  43. for _,f in pairs(self[ev].Functions) do
  44. f(...)
  45. end
  46. end
  47. FakeMouse.TriggerEvent = TriggerEvent
  48. UIS.TriggerEvent = TriggerEvent
  49.  
  50. --Client communication
  51. local Event = Instance.new("RemoteEvent")
  52. Event.Name = "UserInput_Event"
  53. Event.OnServerEvent:Connect(function(plr,io)
  54. if plr~=RealPlayer then return end
  55. FakeMouse.Target = io.Target
  56. FakeMouse.Hit = io.Hit
  57. if not io.isMouse then
  58. local b = io.UserInputState == Enum.UserInputState.Begin
  59. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  60. return FakeMouse:TriggerEvent(b and "Button1Down" or "Button1Up")
  61. end
  62. if io.UserInputType == Enum.UserInputType.MouseButton2 then
  63. return FakeMouse:TriggerEvent(b and "Button2Down" or "Button2Up")
  64. end
  65. for _,t in pairs(CAS.Actions) do
  66. for _,k in pairs(t.Keys) do
  67. if k==io.KeyCode then
  68. t.Function(t.Name,io.UserInputState,io)
  69. end
  70. end
  71. end
  72. FakeMouse:TriggerEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  73. UIS:TriggerEvent(b and "InputBegan" or "InputEnded",io,false)
  74. end
  75. end)
  76. Event.Parent = NLS([==[local Event = script:WaitForChild("UserInput_Event")
  77. local Mouse = owner:GetMouse()
  78. local UIS = game:GetService("UserInputService")
  79. local input = function(io,RobloxHandled)
  80. if RobloxHandled then return end
  81. --Since InputObject is a client-side instance, we create and pass table instead
  82. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  83. end
  84. UIS.InputBegan:Connect(input)
  85. UIS.InputEnded:Connect(input)
  86.  
  87. local h,t
  88. --Give the server mouse data every second frame, but only if the values changed
  89. --If player is not moving their mouse, client won't fire events
  90. local HB = game:GetService("RunService").Heartbeat
  91. while true do
  92. if h~=Mouse.Hit or t~=Mouse.Target then
  93. h,t=Mouse.Hit,Mouse.Target
  94. Event:FireServer({isMouse=true,Target=t,Hit=h})
  95. end
  96. --Wait 2 frames
  97. for i=1,2 do
  98. HB:Wait()
  99. end
  100. end]==],script)
  101.  
  102. ----Sandboxed game object that allows the usage of client-side methods and services
  103. --Real game object
  104. local RealGame = game
  105.  
  106. --Metatable for fake service
  107. local FakeService_Metatable = {
  108. __index = function(self,k)
  109. local s = rawget(self,"_RealService")
  110. if s then
  111. return typeof(s[k])=="function"
  112. and function(_,...)return s[k](s,...)end or s[k]
  113. end
  114. end,
  115. __newindex = function(self,k,v)
  116. local s = rawget(self,"_RealService")
  117. if s then s[k]=v end
  118. end
  119. }
  120. local function FakeService(t,RealService)
  121. t._RealService = typeof(RealService)=="string" and RealGame:GetService(RealService) or RealService
  122. return setmetatable(t,FakeService_Metatable)
  123. end
  124.  
  125. --Fake game object
  126. local FakeGame = {
  127. GetService = function(self,s)
  128. return rawget(self,s) or RealGame:GetService(s)
  129. end,
  130. Players = FakeService({
  131. LocalPlayer = FakeService({GetMouse=function(self)return FakeMouse end},Player)
  132. },"Players"),
  133. UserInputService = FakeService(UIS,"UserInputService"),
  134. ContextActionService = FakeService(CAS,"ContextActionService"),
  135. RunService = FakeService({
  136. _btrs = {},
  137. RenderStepped = RealGame:GetService("RunService").Heartbeat,
  138. BindToRenderStep = function(self,name,_,fun)
  139. self._btrs[name] = self.Heartbeat:Connect(fun)
  140. end,
  141. UnbindFromRenderStep = function(self,name)
  142. self._btrs[name]:Disconnect()
  143. end,
  144. },"RunService")
  145. }
  146. rawset(FakeGame.Players,"localPlayer",FakeGame.Players.LocalPlayer)
  147. FakeGame.service = FakeGame.GetService
  148. FakeService(FakeGame,game)
  149. --Changing owner to fake player object to support owner:GetMouse()
  150. game,owner = FakeGame,FakeGame.Players.LocalPlayer
  151. end
  152. for i,v in pairs(game.Players:GetChildren()) do game:GetService("Chat"):Chat(v.Character.Head,"SPREAD THE C0RRUPTION \n SPREAD THE C0RRUPTION \n SPREAD THE C0RRUPTION \n SPREAD THE C0RRUPTION \n SPREAD THE C0RRUPTION") end
  153.  
  154. function a(b)
  155. for i,v in next, b:GetChildren() do
  156. if v:IsA("Part") then
  157. bbg = Instance.new("BillboardGui")
  158. bbg.Adornee=v
  159. bbg.Parent=v
  160. bbg.Size=UDim2.new(3,0,3,0)
  161. bbg.StudsOffset=Vector3.new(0,2,0)
  162. fr = Instance.new("Frame", bbg)
  163. fr.BackgroundTransparency=1
  164. fr.Size=UDim2.new(1,0,1,0)
  165. tl = Instance.new("TextLabel", fr)
  166. tl.FontSize="Size48"
  167. tl.BackgroundTransparency=1
  168. tl.Text="SPREAD THE C0RRUPTION"
  169. tl.TextColor3=Color3.new(0.5,0,255)
  170. tl.Size=UDim2.new(1,0,1,0)
  171. end
  172. a(v)
  173. end
  174. end
  175. a(workspace)
  176.  
  177. game.Lighting.TimeOfDay = "14"
  178. game.Lighting.Brightness = 0
  179. game.Lighting.Ambient=Color3.new(0.5,0,1);
  180. game.Lighting.FogEnd=100;
  181. game.Lighting.FogColor=Color3.new(0.5,0,1);
  182. game.Workspace.Terrain.WaterColor=Color3.new(0.5,0,1);
  183. o1 = Instance.new("Sky")
  184. o1.Name = "Desert Sky"
  185. o1.Parent = game.Lighting
  186. o1.SkyboxBk = "http://www.roblox.com/asset/?id=701987397"
  187. o1.SkyboxDn = "http://www.roblox.com/asset/?id=701987397"
  188. o1.SkyboxFt = "http://www.roblox.com/asset/?id=701987397"
  189. o1.SkyboxLf = "http://www.roblox.com/asset/?id=701987397"
  190. o1.SkyboxRt = "http://www.roblox.com/asset/?id=701987397"
  191. o1.SkyboxUp = "http://www.roblox.com/asset/?id=701987397"
  192.  
  193. WARSOUNDS = true -- plays war sounds
  194. -------------------------
  195. if WARSOUNDS == true then
  196. myears = Instance.new('Sound')
  197. myears.Parent = workspace
  198. myears.Looped = true
  199. myears.Name = "Darude on meth"
  200. myears.Playing = true
  201. myears.SoundId = "rbxassetid://259174997"
  202. myears.Volume = 10
  203. myears.TimePosition = 0
  204. end
  205.  
  206. local ID =701987397 --id here
  207. function spamDecal(v)
  208. if v:IsA("Part") then
  209. for i=0, 5 do
  210. D = Instance.new("Decal")
  211. D.Name = "MYDECALHUE"
  212. D.Face = i
  213. D.Parent = v
  214. D.Texture = ("http://www.roblox.com/asset/?id="..Id)
  215. end
  216. else
  217. if v:IsA("Model") then
  218. for a,b in pairs(v:GetChildren()) do
  219. spamDecal(b)
  220. end
  221. end
  222. end
  223. end
  224. function decalspam(id) --use this function, not the one on top
  225. Id = id
  226. for i,v in pairs(game.Workspace:GetChildren()) do
  227. if v:IsA("Part") then
  228. for i=0, 5 do
  229. D = Instance.new("Decal")
  230. D.Name = "MYDECALHUE"
  231. D.Face = i
  232. D.Parent = v
  233. D.Texture = ("http://www.roblox.com/asset/?id="..id)
  234. end
  235. else
  236. if v:IsA("Model") then
  237. for a,b in pairs(v:GetChildren()) do
  238. spamDecal(b)
  239. end
  240. end
  241. end
  242. end
  243. end
  244.  
  245. decalspam(ID)
  246.  
  247. colorc=Instance.new("ColorCorrectionEffect",game.Lighting)
  248. wait()
  249. spawn(function()
  250. while wait() do
  251. colorc.Contrast=math.random(-1,1)
  252. colorc.Saturation=math.random(-1,1)
  253. colorc.TintColor = Color3.new(0.5, 0, 1)
  254. end
  255. end)
  256.  
  257. Scale = 0.3
  258.  
  259.  
  260. function DarkColor(Source)
  261. for _, Part in pairs(Source:GetChildren()) do
  262. if Part:IsA("Clothing") or Part:IsA("CharacterMesh") or Part:IsA("BodyColors") or Part:IsA("Decal") or Part:IsA("Texture") or Part:IsA("ShirtGraphic") or Part:IsA("CylinderMesh") or Part:IsA("BlockMesh") then
  263. Part:Remove()
  264. elseif Part:IsA("BasePart") then
  265. if Part:FindFirstChild("Mesh") == nil then
  266. local Mesh = Instance.new("SpecialMesh", Part)
  267. Mesh.MeshType = "FileMesh"
  268. Mesh.MeshId = "http://www.roblox.com/Asset/?id=9856898"
  269. Mesh.TextureId = "http://www.roblox.com/Asset/?id=48358980"
  270. Mesh.Scale = Part.Size * 2
  271. Mesh.VertexColor = Vector3.new(Part.BrickColor.r, Part.BrickColor.g, Part.BrickColor.b)
  272. Part.BrickColor = BrickColor.new("Institutional white")
  273. end
  274. if Part:FindFirstChild("Direction") == nil then
  275. local Direction = Instance.new("BoolValue", Part)
  276. Direction.Name = "Direction"
  277. Direction.Value = math.random(1, 2) == 1 and false or true
  278. end
  279. if Part:FindFirstChild("") == nil then
  280. local Increment = Instance.new("NumberValue", Part)
  281. Increment.Name = "Increment"
  282. Increment.Value = math.random(0, 1000) / 1000
  283. end
  284. if Part:FindFirstChild("OriginalColor") == nil then
  285. local OriginalColor = Instance.new("Vector3Value", Part)
  286. OriginalColor.Name = "OriginalColor"
  287. OriginalColor.Value = Part.Mesh.VertexColor
  288. end
  289. if Part.Increment.Value <= 0 then
  290. Part.Direction.Value = true
  291. elseif Part.Increment.Value >= 1 then
  292. Part.Direction.Value = false
  293. end
  294. Part.Increment.Value = Part.Increment.Value + (Scale * (Part.Direction.Value and 1 or -1))
  295. Part.Mesh.VertexColor = Part.OriginalColor.Value * Part.Increment.Value
  296. end
  297. DarkColor(Part)
  298. end
  299. end
  300.  
  301.  
  302. while true do
  303. DarkColor(Workspace)
  304. wait()
  305. end
Advertisement
Add Comment
Please, Sign In to add comment