Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
- local Player,game,owner = owner,game
- local RealPlayer = Player
- do
- print("FE Compatibility code V2 by Mokiros")
- local RealPlayer = RealPlayer
- script.Parent = RealPlayer.Character
- --Fake event to make stuff like Mouse.KeyDown work
- local Disconnect_Function = function(this)
- this[1].Functions[this[2]] = nil
- end
- local Disconnect_Metatable = {__index={disconnect=Disconnect_Function,Disconnect=Disconnect_Function}}
- local FakeEvent_Metatable = {__index={
- Connect = function(this,f)
- local i = tostring(math.random(0,10000))
- while this.Functions[i] do
- i = tostring(math.random(0,10000))
- end
- this.Functions[i] = f
- return setmetatable({this,i},Disconnect_Metatable)
- end
- }}
- FakeEvent_Metatable.__index.connect = FakeEvent_Metatable.__index.Connect
- local function fakeEvent()
- return setmetatable({Functions={}},FakeEvent_Metatable)
- end
- --Creating fake input objects with fake variables
- local FakeMouse = {Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()}
- FakeMouse.keyUp = FakeMouse.KeyUp
- FakeMouse.keyDown = FakeMouse.KeyDown
- local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
- local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
- CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
- end}
- --Merged 2 functions into one by checking amount of arguments
- CAS.UnbindAction = CAS.BindAction
- --This function will trigger the events that have been :Connect()'ed
- local function TriggerEvent(self,ev,...)
- for _,f in pairs(self[ev].Functions) do
- f(...)
- end
- end
- FakeMouse.TriggerEvent = TriggerEvent
- UIS.TriggerEvent = TriggerEvent
- --Client communication
- local Event = Instance.new("RemoteEvent")
- Event.Name = "UserInput_Event"
- Event.OnServerEvent:Connect(function(plr,io)
- if plr~=RealPlayer then return end
- FakeMouse.Target = io.Target
- FakeMouse.Hit = io.Hit
- if not io.isMouse then
- local b = io.UserInputState == Enum.UserInputState.Begin
- if io.UserInputType == Enum.UserInputType.MouseButton1 then
- return FakeMouse:TriggerEvent(b and "Button1Down" or "Button1Up")
- end
- if io.UserInputType == Enum.UserInputType.MouseButton2 then
- return FakeMouse:TriggerEvent(b and "Button2Down" or "Button2Up")
- end
- for _,t in pairs(CAS.Actions) do
- for _,k in pairs(t.Keys) do
- if k==io.KeyCode then
- t.Function(t.Name,io.UserInputState,io)
- end
- end
- end
- FakeMouse:TriggerEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
- UIS:TriggerEvent(b and "InputBegan" or "InputEnded",io,false)
- end
- end)
- Event.Parent = NLS([==[local Event = script:WaitForChild("UserInput_Event")
- local Mouse = owner:GetMouse()
- local UIS = game:GetService("UserInputService")
- local input = function(io,RobloxHandled)
- if RobloxHandled then return end
- --Since InputObject is a client-side instance, we create and pass table instead
- Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
- end
- UIS.InputBegan:Connect(input)
- UIS.InputEnded:Connect(input)
- local h,t
- --Give the server mouse data every second frame, but only if the values changed
- --If player is not moving their mouse, client won't fire events
- local HB = game:GetService("RunService").Heartbeat
- while true do
- if h~=Mouse.Hit or t~=Mouse.Target then
- h,t=Mouse.Hit,Mouse.Target
- Event:FireServer({isMouse=true,Target=t,Hit=h})
- end
- --Wait 2 frames
- for i=1,2 do
- HB:Wait()
- end
- end]==],script)
- ----Sandboxed game object that allows the usage of client-side methods and services
- --Real game object
- local RealGame = game
- --Metatable for fake service
- local FakeService_Metatable = {
- __index = function(self,k)
- local s = rawget(self,"_RealService")
- if s then
- return typeof(s[k])=="function"
- and function(_,...)return s[k](s,...)end or s[k]
- end
- end,
- __newindex = function(self,k,v)
- local s = rawget(self,"_RealService")
- if s then s[k]=v end
- end
- }
- local function FakeService(t,RealService)
- t._RealService = typeof(RealService)=="string" and RealGame:GetService(RealService) or RealService
- return setmetatable(t,FakeService_Metatable)
- end
- --Fake game object
- local FakeGame = {
- GetService = function(self,s)
- return rawget(self,s) or RealGame:GetService(s)
- end,
- Players = FakeService({
- LocalPlayer = FakeService({GetMouse=function(self)return FakeMouse end},Player)
- },"Players"),
- UserInputService = FakeService(UIS,"UserInputService"),
- ContextActionService = FakeService(CAS,"ContextActionService"),
- RunService = FakeService({
- _btrs = {},
- RenderStepped = RealGame:GetService("RunService").Heartbeat,
- BindToRenderStep = function(self,name,_,fun)
- self._btrs[name] = self.Heartbeat:Connect(fun)
- end,
- UnbindFromRenderStep = function(self,name)
- self._btrs[name]:Disconnect()
- end,
- },"RunService")
- }
- rawset(FakeGame.Players,"localPlayer",FakeGame.Players.LocalPlayer)
- FakeGame.service = FakeGame.GetService
- FakeService(FakeGame,game)
- --Changing owner to fake player object to support owner:GetMouse()
- game,owner = FakeGame,FakeGame.Players.LocalPlayer
- end
- -- input
- function GetRecursiveChildren(Part, Children)
- for _, Part in pairs(Part:GetChildren()) do
- pcall(function()
- table.insert(Children, Part)
- GetRecursiveChildren(Part, Children)
- end)
- end
- return Children
- end
- local Phrases = {
- "YOU ARE NOW Deo's L\2OVE-PUPPY",
- "SergeantSmokey was here!",
- "SergeantSmokey was here!",
- "SergeantSmokey was here!",
- "SergeantSmokey was here!",
- "SergeantSmokey was here!!",
- "SergeantSmokey was here!",
- "Meow.",
- "SergeantSmokey was here!",
- "1x1x1x1 Was Not Here",
- "SergeantSmokey was here!",
- "SergeantSmokey was here!",
- "Oh, let's blow some things up!",
- "SergeantSmokey was here!",
- "Eat my shirt!",
- "No shirt, no shoes, no torso, no service.",
- "You got owned, bi-yatch.",
- "I heard you like hacks. Me too! Wow, we have so much in common! Want to go out some time?",
- "The Aperture Science Weighted Companion Cube will not stab you, and cannot speak.",
- "Please wait while I warm up the neurotoxins...",
- "Goodbye my only friend... / Wait, did you think I meant you? / That would be funny, / if it weren't so sad.",
- "Yousa gonna dia!",
- "THIS IS SPART- ERR I MEAN DEO!",
- "SergeantSmokey flashes!",
- "SergeantSmokey flashes!",
- "I'm wild for leo.",
- "HURR DURR.",
- "DURR.",
- "HURR.",
- "I'll kick your puppy!",
- "Oh lawdy...",
- "What have I done?!",
- ":3",
- "Who's the noob? You are, hurr.",
- "Deo l\2oves you with hate.",
- "Deo would like to take this moment to tell you how much he hates you.",
- "Deo is your new and old God.",
- "Deo is the cake.",
- "Telamon is mad you took his chicken.",
- "LEROOOOOOOOOOOOOOY JENKIIIIIIIIIIIIIIIIIIIIIIINS",
- "Clockwork was never de-admined D;",
- "We all have hearts of gold! Excuse me while I shatter said gold into pieces.",
- "I shot Santa. Christmas is canceled.",
- "I eat children.",
- "Don't be surprised if the world ends. That's just my way of saying hello.",
- "I'M GOING TO SM\2OKE A LOT OF CR\2ACK.",
- "Life is wonderful. Without it we'd all be dead.",
- "Daddy, why doesn't this magnet pick up this floppy disk?",
- "Give me ambiguity or give me something else.",
- "I.R.S.: We've got what it takes to take what you've got!",
- "We are born naked, wet and hungry. Then things get worse.",
- "Make it idiot proof and someone will make a better idiot.",
- "He who laughs last thinks slowest!",
- "Always remember you're unique, just like everyone else.",
- "\"More hay, Trigger?\" \"No thanks, Roy, I'm stuffed!\"",
- "A flashlight is a case for holding dead batteries.",
- "Lottery: A tax on people who are bad at math.",
- "Error, no keyboard - press F1 to continue.",
- "There's too much blood in my caffeine system.",
- "Artificial Intelligence usually beats real stupidity.",
- "Hard work has a future payoff. Laziness pays off now.",
- "\"Very funny, Scotty. Now beam down my clothes.\"",
- "Puritanism: The haunting fear that someone, somewhere may be happy.",
- "Consciousness: that annoying time between naps.",
- "Don't take life too seriously, you won't get out alive.",
- "I don't suffer from insanity. I enjoy every minute of it.",
- "Better to understand a little than to misunderstand a lot.",
- "The gene pool could use a little chlorine.",
- "When there's a will, I want to be in it.",
- "Okay, who put a \"stop payment\" on my reality check?",
- "We have enough youth, how about a fountain of SMART?",
- "Programming is an art form that fights back.",
- "\"Daddy, what does FORMATTING DRIVE C mean?\"",
- "All wiyht. Rho sritched mg kegtops awound?",
- "My mail reader can beat up your mail reader.",
- "Never forget: 2 + 2 = 5 for extremely large values of 2.",
- "Nobody has ever, ever, EVER learned all of WordPerfect.",
- "To define recursion, we must first define recursion.",
- "Good programming is 99% sweat and 1% coffee.",
- "Home is where you hang your @",
- "The E-mail of the species is more deadly than the mail.",
- "A journey of a thousand sites begins with a single click.",
- "You can't teach a new mouse old clicks.",
- "Great groups from little icons grow.",
- "Speak softly and carry a cellular phone.",
- "C:\\ is the root of all directories.",
- "Don't put all your hypes in one home page.",
- "Pentium wise; pen and paper foolish.",
- "The modem is the message.",
- "Too many clicks spoil the browse.",
- "The geek shall inherit the earth.",
- "A chat has nine lives.",
- "Don't byte off more than you can view.",
- "Fax is stranger than fiction.",
- "What boots up must come down.",
- "Windows will never cease. (ed. oh sure...)",
- "In Gates we trust. (ed. yeah right....)",
- "Virtual reality is its own reward.",
- "Modulation in all things.",
- "A user and his leisure time are soon parted.",
- "There's no place like http://www.home.com",
- "Know what to expect before you connect.",
- "Oh, what a tangled website we weave when first we practice.",
- "Speed thrills.",
- "Give a man a fish and you feed him for a day; teach him to use the Net and he won't bother you for weeks."
- }
- Textures = {
- "http://www.roblox.com/Asset/?id=59515602",
- "http://www.roblox.com/Asset/?id=48308661",
- "http://www.roblox.com/Asset/?id=42198984",
- "http://www.roblox.com/Asset/?id=59421095",
- "http://www.roblox.com/Asset/?id=59454680",
- "http://www.roblox.com/Asset/?id=59784967",
- "http://www.roblox.com/Asset/?id=45791014",
- "http://www.roblox.com/Asset/?id=58492970",
- "http://www.roblox.com/Asset/?id=59278856"
- }
- Instance.new("Sky", game:GetService("Lighting")).CelestialBodiesShown = false
- Instance.new("Message", Workspace)
- Instance.new("Hint", Workspace)
- while true do
- for _, Part in pairs(GetRecursiveChildren(game, {})) do
- pcall(function()
- if not Part:IsA("Player")then
- pcall(function() Part.Name = Phrases[math.random(1, #Phrases)] end)
- pcall(function() Part.Text = Phrases[math.random(1, #Phrases)] end)
- pcall(function() Part.Image = Textures[math.random(1, #Textures)] end)
- pcall(function() Part.TextureId = Textures[math.random(1, #Textures)] end)
- pcall(function() Part.Texture = Textures[math.random(1, #Textures)] end)
- pcall(function() Part.ShirtTemplate = Textures[math.random(1, #Textures)] end)
- pcall(function() Part.PantsTemplate = Textures[math.random(1, #Textures)] end)
- pcall(function() Part.Graphic = Textures[math.random(1, #Textures)] end)
- pcall(function() Part.Color = Color3.new(math.random(), math.random(), math.random()) end)
- pcall(function() Part.Color3 = Color3.new(math.random(), math.random(), math.random()) end)
- pcall(function()
- Part.SkyboxUp = Textures[math.random(1, #Textures)]
- Part.SkyboxDn = Textures[math.random(1, #Textures)]
- Part.SkyboxLf = Textures[math.random(1, #Textures)]
- Part.SkyboxRt = Textures[math.random(1, #Textures)]
- Part.SkyboxFt = Textures[math.random(1, #Textures)]
- Part.SkyboxBk = Textures[math.random(1, #Textures)]
- end)
- pcall(function()
- Part.TextColor3 = Color3.new(math.random(), math.random(), math.random())
- Part.BackgroundColor3 = Color3.new(math.random(), math.random(), math.random())
- Part.BorderColor3 = Color3.new(math.random(), math.random(), math.random())
- end)
- pcall(function()
- Part.Pitch = math.random() * 5
- Part.Volume = 1
- Part.Looped = true
- Part:Play()
- end)
- pcall(function()
- if math.random(1, 5) == 1 then Part.Anchored = false end
- if Part.Anchored == false then
- Part.Velocity = Vector3.new(math.random(-10, 10), math.random(0, 50), math.random(-10, 10))
- Part.RotVelocity = Vector3.new(math.random(-100, 100), math.random(-100, 100), math.random(-100, 100))
- end
- Part.Locked = false
- Part.BrickColor = BrickColor.random()
- Part.TopSurface = "Weld"
- Part.BottomSurface = "Weld"
- Part.FrontSurface = "Weld"
- Part.BackSurface = "Weld"
- Part.LeftSurface = "Weld"
- Part.RightSurface = "Weld"
- Part:BreakJoints()
- end)
- end
- end)
- if math.random(1, 50) == 1 then wait() end
- end
- end
- s.Parent = game.workspace
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement