SHARE
TWEET

The Omni-God Of Erradication

a guest Jun 26th, 2019 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local plr = owner
  2. local mouse = plr:GetMouse()
  3.  
  4. mouse.KeyDown:connect(function(Key)
  5.     if Key == "f" then
  6.         local cc = Instance.new("ColorCorrectionEffect")
  7.         cc.Parent = game.Lighting
  8.         cc.Enabled = true
  9.        
  10.         cc.TintColor = Color3.new(200, 50, 50)
  11.         cc.Contrast = 2
  12.         cc.Brightness = 0
  13.         cc.Saturation = 0
  14.         for _, child in pairs(workspace:GetChildren()) do
  15.             if child.Name ~= plr.Name then
  16.             if child.ClassName == "Model" then
  17.                     for _, part in pairs(child:GetChildren()) do
  18.                         if part.ClassName == "Part" then
  19.                             part.Anchored = true
  20.                     end
  21.                 end
  22.             end
  23.             end
  24.         end
  25.     wait(10)
  26.     for _, child in pairs(workspace:GetChildren()) do
  27.         if child.Name ~= plr.Name then
  28.             if child.ClassName == "Model" then
  29.                     for _, part in pairs(child:GetChildren()) do
  30.                         if part.ClassName == "Part" then
  31.                             part.Anchored = false
  32.                         end
  33.                         end
  34.                 end
  35.                
  36.             end
  37.                 cc:Destroy()
  38. end
  39. end
  40. end)
  41. -- This script has been converted to FE by iPxter
  42.  
  43.  
  44. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  45. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  46. do
  47.     print("FE Compatibility code by Mokiros | Translated to FE by iPxter")
  48.     script.Parent = Player.Character
  49.  
  50.     --RemoteEvent for communicating
  51.     local Event = Instance.new("RemoteEvent")
  52.     Event.Name = "UserInput_Event"
  53.  
  54.     --Fake event to make stuff like Mouse.KeyDown work
  55.     local function fakeEvent()
  56.         local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
  57.         t.connect = t.Connect
  58.         return t
  59.     end
  60.  
  61.     --Creating fake input objects with fake variables
  62.     local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  63.     local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  64.     local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  65.         CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  66.     end}
  67.     --Merged 2 functions into one by checking amount of arguments
  68.     CAS.UnbindAction = CAS.BindAction
  69.  
  70.     --This function will trigger the events that have been :Connect()'ed
  71.     local function te(self,ev,...)
  72.         local t = m[ev]
  73.         if t and t._fakeEvent and t.Function then
  74.             t.Function(...)
  75.         end
  76.     end
  77.     m.TrigEvent = te
  78.     UIS.TrigEvent = te
  79.  
  80.     Event.OnServerEvent:Connect(function(plr,io)
  81.         if plr~=Player then return end
  82.         if io.isMouse then
  83.             m.Target = io.Target
  84.             m.Hit = io.Hit
  85.         else
  86.             local b = io.UserInputState == Enum.UserInputState.Begin
  87.             if io.UserInputType == Enum.UserInputType.MouseButton1 then
  88.                 return m:TrigEvent(b and "Button1Down" or "Button1Up")
  89.             end
  90.             for _,t in pairs(CAS.Actions) do
  91.                 for _,k in pairs(t.Keys) do
  92.                     if k==io.KeyCode then
  93.                         t.Function(t.Name,io.UserInputState,io)
  94.                     end
  95.                 end
  96.             end
  97.             m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  98.             UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  99.         end
  100.     end)
  101.     Event.Parent = NLS([==[
  102.     local Player = owner
  103.     local Event = script:WaitForChild("UserInput_Event")
  104.  
  105.     local UIS = game:GetService("UserInputService")
  106.     local input = function(io,a)
  107.         if a then return end
  108.         --Since InputObject is a client-side instance, we create and pass table instead
  109.         Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
  110.     end
  111.     UIS.InputBegan:Connect(input)
  112.     UIS.InputEnded:Connect(input)
  113.  
  114.     local h,t
  115.     --Give the server mouse data 30 times every second, but only if the values changed
  116.     --If player is not moving their mouse, client won't fire events
  117.     while wait(1/30) do
  118.         if h~=Mouse.Hit or t~=Mouse.Target then
  119.             h,t=Mouse.Hit,Mouse.Target
  120.             Event:FireServer({isMouse=true,Target=t,Hit=h})
  121.         end
  122.     end]==],Player.Character)
  123.     Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
  124. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top