Advertisement
kingdraf

ea

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