ManOhMan

Untitled

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