SHARE
TWEET

Untitled

PasterXIV Nov 16th, 2019 55 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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,Mouse,mouse,UserInputService,ContextActionService = owner
  4. local RealPlayer = Player
  5. do print("FE Compatibility code by Mokiros")local a=RealPlayer;script.Parent=a.Character;local b=Instance.new("RemoteEvent")b.Name="UserInput_Event"local function c()local d={_fakeEvent=true,Functions={},Connect=function(self,e)table.insert(self.Functions,e)end}d.connect=d.Connect;return d end;local f={Target=nil,Hit=CFrame.new(),KeyUp=c(),KeyDown=c(),Button1Up=c(),Button1Down=c(),Button2Up=c(),Button2Down=c()}local g={InputBegan=c(),InputEnded=c()}local CAS={Actions={},BindAction=function(self,h,i,j,...)CAS.Actions[h]=i and{Name=h,Function=i,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function k(self,l,...)local d=f[l]if d and d._fakeEvent then for m,e in pairs(d.Functions)do e(...)end end end;f.TrigEvent=k;g.TrigEvent=k;b.OnServerEvent:Connect(function(n,o)if n~=a then return end;f.Target=o.Target;f.Hit=o.Hit;if not o.isMouse then local p=o.UserInputState==Enum.UserInputState.Begin;if o.UserInputType==Enum.UserInputType.MouseButton1 then return f:TrigEvent(p and"Button1Down"or"Button1Up")end;if o.UserInputType==Enum.UserInputType.MouseButton2 then return f:TrigEvent(p and"Button2Down"or"Button2Up")end;for m,d in pairs(CAS.Actions)do for m,q in pairs(d.Keys)do if q==o.KeyCode then d.Function(d.Name,o.UserInputState,o)end end end;f:TrigEvent(p and"KeyDown"or"KeyUp",o.KeyCode.Name:lower())g:TrigEvent(p and"InputBegan"or"InputEnded",o,false)end end)b.Parent=NLS([==[local a=game:GetService("Players").LocalPlayer;local b=script:WaitForChild("UserInput_Event")local c=a:GetMouse()local d=game:GetService("UserInputService")local e=function(f,g)if g then return end;b:FireServer({KeyCode=f.KeyCode,UserInputType=f.UserInputType,UserInputState=f.UserInputState,Hit=c.Hit,Target=c.Target})end;d.InputBegan:Connect(e)d.InputEnded:Connect(e)local h,i;while wait(1/30)do if h~=c.Hit or i~=c.Target then h,i=c.Hit,c.Target;b:FireServer({isMouse=true,Target=i,Hit=h})end end]==],Player.Character)local r=game;local s={__index=function(self,q)local t=rawget(self,"_RealService")if t then return typeof(t[q])=="function"and function(m,...)return t[q](t,...)end or t[q]end end,__newindex=function(self,q,u)local t=rawget(self,"_RealService")if t then t[q]=u end end}local function v(d,w)d._RealService=typeof(w)=="string"and r:GetService(w)or w;return setmetatable(d,s)end;local x={GetService=function(self,t)return rawget(self,t)or r:GetService(t)end,Players=v({LocalPlayer=v({GetMouse=function(self)return f end},Player)},"Players"),UserInputService=v(g,"UserInputService"),ContextActionService=v(CAS,"ContextActionService"),RunService=v({_btrs={},Soundscape=r:GetService("RunService").Heartbeat,BindToSoundscape=function(self,h,m,i)self._btrs[h]=self.Heartbeat:Connect(i)end,UnbindFromRenderStep=function(self,h)self._btrs[h]:Disconnect()end},"RunService")}rawset(x.Players,"localPlayer",x.Players.LocalPlayer)x.service=x.GetService;v(x,game)game,owner=x,x.Players.LocalPlayer end
  6.  
  7. local p = game.Players.LocalPlayer
  8. local char = p.Character
  9. local size = 8
  10. part = function()
  11.  
  12.   local a = Instance.new("Part", script)
  13.   a.Anchored = true
  14.   a.CanCollide = true
  15.   a.CFrame = char.Torso.CFrame
  16.   a.Size = Vector3.new(size, 0.2, 0.2)
  17.   a.Transparency = 1
  18.   return a
  19. end
  20.  
  21. part2 = function()
  22.  
  23.   local a = Instance.new("Part", script)
  24.   a.Anchored = true
  25.   a.CanCollide = true
  26.   a.CFrame = char.Torso.CFrame
  27.   a.Size = Vector3.new(0.2, size, 0.2)
  28.   a.Transparency = 1
  29.   return a
  30. end
  31.  
  32. part3 = function()
  33.  
  34.   local a = Instance.new("Part", script)
  35.   a.Anchored = true
  36.   a.CanCollide = false
  37.   a.Size = Vector3.new(size, size, 1)
  38.   a.Transparency = 0.7
  39.   a.Material = "Neon"
  40.   a.BrickColor = BrickColor.Random()
  41.   local b = Instance.new("BlockMesh", a)
  42.   b.Scale = Vector3.new(1, 1, 0)
  43.   return a
  44. end
  45.  
  46. local replicating = false
  47. local root, a, b, c, d, a2, b2, c2, d2, aa, bb, cc, dd, z, x, c, v, b, n = nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil
  48. replicate = function()
  49.  
  50.   replicating = true
  51.   script:ClearAllChildren()
  52.   root = part()
  53.   root.Transparency = 1
  54.   root.Size = Vector3.new(0.2, 0.2, 0.2)
  55.   root.CanCollide = false
  56.   a = part()
  57.   b = part()
  58.   c = part()
  59.   d = part()
  60.   a2 = part()
  61.   b2 = part()
  62.   c2 = part()
  63.   d2 = part()
  64.   aa = part2()
  65.   bb = part2()
  66.   cc = part2()
  67.   dd = part2()
  68.   z = part3()
  69.   x = part3()
  70.   c = part3()
  71.   v = part3()
  72.   b = part3()
  73.   n = part3()
  74.   replicating = false
  75. end
  76.  
  77. script.ChildRemoved:connect(function(a)
  78.  
  79.   if a.ClassName == "Part" and replicating == false then
  80.     replicate()
  81.   end
  82. end
  83. )
  84. replicate()
  85. local tick = 0
  86. CreateRegion3FromLocAndSize = function(Position, Size)
  87.  
  88.   local SizeOffset = Size / 2
  89.   local Point1 = Position - SizeOffset
  90.   local Point2 = Position + SizeOffset
  91.   return Region3.new(Point1, Point2)
  92. end
  93.  
  94. local set = false
  95. local whitelist = {"Hieroku", "PPATTA", "DevGamerzz", "I kill U", "kash5", "ZeroCrimson", "Zaidia", "tsup2", "PointCoded", "CLarramore", "Suzuuki", "", "", ""}
  96. p.Chatted:connect(function(ms)
  97.  
  98.   if ms:sub(1, 5) == "size-" then
  99.     size = tonumber(ms:sub(6))
  100.     replicate()
  101.   else
  102.     if ms:sub(1, 4) == "set-" then
  103.       set = true
  104.       z.CanCollide = false
  105.       x.CanCollide = false
  106.       c.CanCollide = false
  107.       v.CanCollide = false
  108.       b.CanCollide = false
  109.       n.CanCollide = false
  110.     else
  111.       if ms:sub(1, 6) == "unset-" then
  112.         set = false
  113.         z.CanCollide = false
  114.         x.CanCollide = false
  115.         c.CanCollide = false
  116.         v.CanCollide = false
  117.         b.CanCollide = false
  118.         n.CanCollide = false
  119.       else
  120.         if ms:sub(1, 10) == "whitelist-" then
  121.           table.insert(whitelist, ms:sub(11))
  122.         else
  123.           if ms:sub(1, 12) == "unwhitelist-" then
  124.             for i,v in pairs(whitelist) do
  125.               if ms:sub(13) == v then
  126.                 table.remove(whitelist, i)
  127.                 break
  128.               end
  129.             end
  130.           end
  131.         end
  132.       end
  133.     end
  134.   end
  135. end
  136. )
  137. local magicpos = nil
  138. game:GetService("RunService").Heartbeat:connect(function()
  139.  
  140.   pcall(function()
  141.    
  142.     local void = char:GetChildren()
  143.     for _,pl in pairs(whitelist) do
  144.       if game.Players:FindFirstChild(pl) ~= nil and game.Players:FindFirstChild(pl).Character ~= nil then
  145.         for i,v in pairs(game.Players[pl].Character:GetChildren()) do
  146.           table.insert(void, v)
  147.         end
  148.       end
  149.     end
  150.     for i,v in pairs(game.Players:GetPlayers()) do
  151.       if v.Character:isDescendantOf(char) and not v.Name == "FangxWulf" then
  152.         v:LoadCharacter()
  153.       end
  154.     end
  155.     char.Humanoid.Health = math.huge
  156.     tick = tick + 0.01
  157.     if not set then
  158.       root.CFrame = root.CFrame:lerp(CFrame.new(char.Torso.CFrame.p) * CFrame.Angles(math.sin(tick) * 100 / 30 / (size / 2), math.cos(tick) * 100 / 30 / (size / 2), math.cos(tick) * 100 / 30 / (size / 2)), 0.1)
  159.       magicpos = char.Torso.CFrame
  160.     else
  161.       root.CFrame = root.CFrame:lerp(CFrame.new(magicpos.p) * CFrame.Angles(0, 0, 0), 0.05)
  162.     end
  163.     local reg = CreateRegion3FromLocAndSize(root.CFrame.p, Vector3.new(size, size, size))
  164.     for i,v in pairs(game.Workspace:FindPartsInRegion3WithIgnoreList(reg, void, 100)) do
  165.       if v.Name ~= "Base" then
  166.         v:Destroy()
  167.       end
  168.     end
  169.     a.CFrame = root.CFrame * CFrame.new(size / 2, size / 2, 0) * CFrame.Angles(0, math.rad(90), 0)
  170.     b.CFrame = root.CFrame * CFrame.new(-size / 2, size / 2, 0) * CFrame.Angles(0, math.rad(90), 0)
  171.     c.CFrame = root.CFrame * CFrame.new(0, size / 2, size / 2)
  172.     d.CFrame = root.CFrame * CFrame.new(0, size / 2, -size / 2)
  173.     a2.CFrame = root.CFrame * CFrame.new(size / 2, -size / 2, 0) * CFrame.Angles(0, math.rad(90), 0)
  174.     b2.CFrame = root.CFrame * CFrame.new(-size / 2, -size / 2, 0) * CFrame.Angles(0, math.rad(90), 0)
  175.     c2.CFrame = root.CFrame * CFrame.new(0, -size / 2, size / 2)
  176.     d2.CFrame = root.CFrame * CFrame.new(0, -size / 2, -size / 2)
  177.     aa.CFrame = root.CFrame * CFrame.new(size / 2, 0, size / 2)
  178.     bb.CFrame = root.CFrame * CFrame.new(-size / 2, 0, size / 2)
  179.     cc.CFrame = root.CFrame * CFrame.new(-size / 2, 0, -size / 2)
  180.     dd.CFrame = root.CFrame * CFrame.new(size / 2, 0, -size / 2)
  181.     z.CFrame = root.CFrame * CFrame.new(size / 2, 0, 0) * CFrame.Angles(0, math.rad(90), 0)
  182.     x.CFrame = root.CFrame * CFrame.new(-size / 2, 0, 0) * CFrame.Angles(0, math.rad(90), 0)
  183.     c.CFrame = root.CFrame * CFrame.new(0, 0, size / 2) * CFrame.Angles(0, 0, math.rad(90))
  184.     v.CFrame = root.CFrame * CFrame.new(0, 0, -size / 2) * CFrame.Angles(0, 0, math.rad(90))
  185.     b.CFrame = root.CFrame * CFrame.new(0, size / 2, 0) * CFrame.Angles(math.rad(90), 0, 0)
  186.     n.CFrame = root.CFrame * CFrame.new(0, -size / 2, 0) * CFrame.Angles(math.rad(90), 0, 0)
  187.   end
  188. )
  189. end
  190. )
  191. while true do
  192. a.BrickColor = BrickColor.Random()
  193. b.BrickColor = BrickColor.Random()
  194. c.BrickColor = BrickColor.Random()
  195. d.BrickColor = BrickColor.Random()
  196. aa.BrickColor = BrickColor.Random()
  197. bb.BrickColor = BrickColor.Random()
  198. cc.BrickColor = BrickColor.Random()
  199. dd.BrickColor = BrickColor.Random()
  200. a2.BrickColor = BrickColor.Random()
  201. b2.BrickColor = BrickColor.Random()
  202. c2.BrickColor = BrickColor.Random()
  203. d2.BrickColor = BrickColor.Random()
  204. z.BrickColor = BrickColor.Random()
  205. x.BrickColor = BrickColor.Random()
  206. c.BrickColor = BrickColor.Random()
  207. v.BrickColor = BrickColor.Random()
  208. b.BrickColor = BrickColor.Random()
  209. n.BrickColor = BrickColor.Random()
  210. 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