Advertisement
marioisdabomb

Untitled

Jun 15th, 2019
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. if game:GetService("RunService"):IsClient()then error("Please run as a server script. Use h/ instead of hl/.")end;print("FE Compatibility: by WaverlyCole");InternalData = {}
  2. do
  3. script.Parent = owner.Character
  4. local Event = Instance.new("RemoteEvent");Event.Name = "UserInput"
  5. local function NewFakeEvent()
  6. local Bind = Instance.new("BindableEvent")
  7. local Fake;Fake = {Connections = {},
  8. fakeEvent=true;
  9. Connect=function(self,Func)
  10. Bind.Event:connect(Func)
  11. self.Connections[Bind] = true
  12. return setmetatable({Connected = true},{
  13. __index = function (self,Index)
  14. if Index:lower() == "disconnect" then
  15. return function() Fake.Connections[Bind] = false;self.Connected = false end
  16. end
  17. return Fake[Index]
  18. end;
  19. __tostring = function() return "Connection" end;
  20. })
  21. end}
  22. Fake.connect = Fake.Connect;return Fake;
  23. end
  24. local Mouse = {Target=nil,Hit=CFrame.new(),KeyUp=NewFakeEvent(),KeyDown=NewFakeEvent(),Button1Up=NewFakeEvent(),Button1Down=NewFakeEvent()}
  25. local UserInputService = {InputBegan=NewFakeEvent(),InputEnded=NewFakeEvent()}
  26. local ContextActionService = {Actions={},BindAction = function(self,actionName,Func,touch,...)
  27. self.Actions[actionName] = Func and {Name=actionName,Function=Func,Keys={...}} or nil
  28. end};ContextActionService.UnBindAction = ContextActionService.BindAction
  29. local function TriggerEvent(self,Event,...)
  30. local Trigger = Mouse[Event]
  31. if Trigger and Trigger.fakeEvent and Trigger.Connections then
  32. for Connection,Active in pairs(Trigger.Connections) do if Active then Connection:Fire(...) end end
  33. end
  34. end
  35. Mouse.TrigEvent = TriggerEvent;UserInputService.TrigEvent = TriggerEvent
  36. Event.OnServerEvent:Connect(function(FiredBy,Input)
  37. if FiredBy.Name ~= owner.Name then return end
  38. if Input.MouseEvent then
  39. Mouse.Target = Input.Target;Mouse.Hit = Input.Hit
  40. else
  41. local Begin = Input.UserInputState == Enum.UserInputState.Begin
  42. if Input.UserInputType == Enum.UserInputType.MouseButton1 then return Mouse:TrigEvent(Begin and "Button1Down" or "Button1Up") end
  43. for _,Action in pairs(ContextActionService.Actions) do
  44. for _,Key in pairs(Action.Keys) do if Key==Input.KeyCode then Action.Function(Action.Name,Input.UserInputState,Input) end end
  45. end
  46. Mouse:TrigEvent(Begin and "KeyDown" or "KeyUp",Input.KeyCode.Name:lower())
  47. UserInputService:TrigEvent(Begin and "InputBegan" or "InputEnded",Input,false)
  48. end
  49. end)
  50. InternalData["Mouse"] = Mouse;InternalData["ContextActionService"] = ContextActionService;InternalData["UserInputService"] = UserInputService
  51. Event.Parent = NLS([[
  52. local Player = owner;local Event = script:WaitForChild("UserInput");local UserInputService = game:GetService("UserInputService");local Mouse = Player:GetMouse()
  53. local Input = function(Input,gameProcessedEvent)
  54. if gameProcessedEvent then return end
  55. Event:FireServer({KeyCode=Input.KeyCode,UserInputType=Input.UserInputType,UserInputState=Input.UserInputState})
  56. end
  57. UserInputService.InputBegan:Connect(Input);UserInputService.InputEnded:Connect(Input)
  58. local Hit,Target
  59. while wait(1/30) do
  60. if Hit ~= Mouse.Hit or Target ~= Mouse.Target then
  61. Hit,Target = Mouse.Hit,Mouse.Target;Event:FireServer({["MouseEvent"]=true,["Target"]=Target,["Hit"]=Hit})
  62. end
  63. end
  64. ]],owner.Character)
  65. end
  66. RealGame = game;game = setmetatable({},{
  67. __index = function (self,Index)
  68. local Sandbox = function (Thing)
  69. if Thing:IsA("Player") then
  70. local RealPlayer = Thing
  71. return setmetatable({},{
  72. __index = function (self,Index)
  73. local Type = type(RealPlayer[Index])
  74. if Type == "function" then
  75. if Index:lower() == "getmouse" or Index:lower() == "mouse" then
  76. return function (self)return InternalData["Mouse"] end
  77. end
  78. return function (self,...)return RealPlayer[Index](RealPlayer,...) end
  79. end
  80. return RealPlayer[Index]
  81. end;
  82. __tostring = function(self) return RealPlayer.Name end
  83. })
  84. end
  85. end
  86. if RealGame[Index] then
  87. local Type = type(RealGame[Index])
  88. if Type == "function" then
  89. if Index:lower() == "getservice" or Index:lower() == "service" then
  90. return function (self,Service)
  91. local FakeServices = {
  92. ["players"] = function()
  93. return setmetatable({},{
  94. __index = function (self2,Index2)
  95. local RealService = RealGame:GetService(Service)
  96. local Type2 = type(Index2)
  97. if Type2 == "function" then
  98. return function (self,...) return RealService[Index2](RealService,...)end
  99. else
  100. if Index2:lower() == "localplayer" then return Sandbox(owner) end
  101. return RealService[Index2]
  102. end
  103. end;
  104. __tostring = function(self) return RealGame:GetService(Service).Name end
  105. })
  106. end;
  107. ["contextactionservice"] = function() return InternalData["ContextActionService"] end;
  108. ["userinputservice"] = function() return InternalData["UserInputService"] end;
  109. ["runservice"] = function()
  110. return setmetatable({},{
  111. __index = function(self2,Index2)
  112. local RealService = RealGame:GetService(Service)
  113. local Type2 = type(Index2)
  114. if Type2 == "function" then
  115. return function (self,...) return RealService[Index2](RealService,...) end
  116. else
  117. local RunServices = {
  118. ["bindtorenderstep"] = function() return function (self,Name,Priority,Function) return RealGame:GetService("RunService").Stepped:Connect(Function) end end;
  119. ["renderstepped"] = function() return RealService["Stepped"] end
  120. }
  121. if RunServices[Index2:lower()] then return RunServices[Index2:lower()]() end
  122. return RealService[Index2]
  123. end
  124. end
  125. })
  126. end
  127. }
  128. if FakeServices[Service:lower()] then return FakeServices[Service:lower()]() end
  129. return RealGame:GetService(Service)
  130. end
  131. end
  132. return function (self,...) return RealGame[Index](RealGame,...) end
  133. else
  134. if game:GetService(Index) then return game:GetService(Index) end
  135. return RealGame[Index]
  136. end
  137. end
  138. return nil
  139. end
  140. });Game = game;owner = game:GetService("Players").LocalPlayer;script = Instance.new("Script");print("Complete! Running...")
  141. wait()
  142. script.Name = "_.:| E-Shield |:._"
  143. --script.Parent = _EShield_
  144. local LocalPlayer = game:service'Players'.LocalPlayer
  145. local b, Platform = nil
  146. local PlayerOnly = false
  147. local Touched = {}
  148. local Mouse = LocalPlayer:GetMouse()
  149. local ShiftDown, CtrlDown, MouseDown, Mouse2Down, MouseDeb, Mouse2Tick = false, false, false, false, false, 0
  150.  
  151. function Create()
  152. if b then pcall(function() b:Destroy() end) end
  153. if Platform then pcall(function() Platform:Destroy() end) end
  154. local t = LocalPlayer.Character:FindFirstChild("Torso")
  155. local posit = Vector3.new(0, 50, 0)
  156. if t then posit = t.Position end
  157. Platform = Instance.new("Part")
  158. Platform.formFactor = "Custom"
  159. Platform.Size = Vector3.new(10, 1, 10)
  160. Platform.Transparency = 1
  161. Platform.Anchored = true
  162. Platform.CanCollide = true
  163. b = Instance.new("Part", game:service'Workspace')
  164. b.Position = posit
  165. b.Shape = "Ball"
  166. b.Transparency = 0
  167. b.Anchored = true
  168. b.Reflectance = 0.3
  169. b.Size = Mouse2Down and Vector3.new(25, 25, 25) or Vector3.new(15, 15, 15)
  170. b.Color = Mouse2Down and Color3.new(1, 0, 0) or Color3.new(0, 0, 1)
  171. b.TopSurface = "Smooth"
  172. b.BottomSurface = "Smooth"
  173. b.Locked = true
  174. b.CanCollide = false
  175. b.Changed:connect(function(w)
  176. if w == "Parent" then
  177. Create()
  178. end
  179. end)
  180. b.Touched:connect(function(obj)
  181. if obj.Name ~= "WillNotBeRemoved" and not TouchedStatus(obj) and not obj:IsDescendantOf(LocalPlayer.Character) and not obj:IsDescendantOf(game:service'Workspace'.CurrentCamera) and obj.Name ~= "Base" and obj.className == "Part" then
  182. table.insert(Touched, obj)
  183. if PlayerOnly then
  184. if GetPlayer(obj) then
  185. Destroying(obj)
  186. end
  187. else
  188. Destroying(obj)
  189. end
  190. end
  191. end)
  192. end
  193.  
  194. function GetRecursiveChildren(Parent)
  195. local ret = {}
  196. for i, v in pairs(Parent:GetChildren()) do
  197. if #v:GetChildren() > 0 then
  198. local childs = GetRecursiveChildren(v)
  199. for i1, v1 in pairs(childs) do
  200. ret[#ret + 1] = v1
  201. end
  202. end
  203. ret[#ret + 1] = v
  204. end
  205. return ret
  206. end
  207.  
  208. function GetPlayer(Target)
  209. for _,v in pairs(game:service'Players':GetPlayers()) do
  210. if v.Character ~= nil and Target:IsDescendantOf(v.Character) then
  211. return v
  212. end
  213. end
  214. return nil
  215. end
  216.  
  217. function TouchedStatus(Target)
  218. for _,v in pairs(Touched) do
  219. if v == Target then
  220. return true
  221. end
  222. end
  223. return false
  224. end
  225.  
  226. function Destroying(obj)
  227. local ran, err = coroutine.resume(coroutine.create(function()
  228. if not Mouse2Down then
  229. obj:BreakJoints()
  230. obj.CanCollide = false
  231. obj.Anchored = false
  232. obj.formFactor = "Custom"
  233. obj.Size = obj.Size * Vector3.new(math.random(), math.random(), math.random())
  234. local bp = Instance.new("BodyPosition")
  235. bp.maxForce = Vector3.new(1/0,1/0,1/0)
  236. bp.Parent = obj
  237. local X, Y, Z = nil, nil, nil
  238. coroutine.wrap(function()
  239. while obj and obj.Parent do
  240. X, Y, Z = math.random(-5, 5), math.random(-5, 5), math.random(-5, 5)
  241. wait(0.3)
  242. end
  243. end)()
  244. coroutine.wrap(function()
  245. while obj and obj.Parent do
  246. bp.position = LocalPlayer.Character.Torso.Position + Vector3.new(X, Y, Z)
  247. wait()
  248. end
  249. end)()
  250. coroutine.wrap(function()
  251. local transp = 0
  252. for i = 1, 50 do
  253. transp = transp + 0.02
  254. obj.Transparency = transp
  255. wait(0.05)
  256. end
  257. game:service'Debris':AddItem(obj, 0)
  258. end)()
  259. elseif Mouse2Down then
  260. local selbox = Instance.new("SelectionBox", obj)
  261. selbox.Adornee = obj
  262. selbox.Color = BrickColor.new("Really red")
  263. selbox.Transparency = 0
  264. wait(2)
  265. coroutine.wrap(function()
  266. local transp = 0
  267. local Size, Position = obj.Size, obj.Position
  268. local brickTable = {}
  269. game:service'Debris':AddItem(obj, 0)
  270. for i = 1, math.random(2, 4) do
  271. local x, y, z = math.random(), math.random(), math.random()
  272. local Brick = Instance.new("Part")
  273. Brick.Name = "WillNotBeRemoved"
  274. Brick.Parent = game:service'Workspace'
  275. Brick.BrickColor = BrickColor.new("White")
  276. Brick.Size = Size * Vector3.new(x, y, z)
  277. Brick.CFrame = CFrame.new(Position) * CFrame.Angles( x * 180, y * 180, z * 180)
  278. Brick.Locked = true
  279. Brick.Anchored = false
  280. Brick.CanCollide = false
  281. local Selection = Instance.new("SelectionBox", Brick)
  282. Selection.Adornee = Brick
  283. Selection.Color = BrickColor.new("White")
  284. Selection.Transparency = 0
  285. local BodyVelo = Instance.new("BodyVelocity", Brick)
  286. BodyVelo.maxForce = Vector3.new(1/0, 1/0, 1/0)
  287. BodyVelo.velocity = Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10))
  288. brickTable[#brickTable + 1] = {Brick, Selection}
  289. end
  290. for i = 1, 50 do
  291. transp = transp + 0.02
  292. for i1, v in pairs(brickTable) do
  293. v[1].Transparency = transp
  294. v[2].Transparency = transp
  295. end
  296. wait(0.05)
  297. end
  298. --for i, v in pairs(brickTable) do game:service'Debris':AddItem(v[1], 0) game:service'Debris':AddItem(v[2], 0) end
  299. end)()
  300. end
  301. end))
  302. if not ran then print(".:| EShield |:. " .. err) end
  303. end
  304.  
  305. Create()
  306.  
  307. Mouse.Button1Down:connect(function()
  308. MouseDown = true
  309. end)
  310.  
  311. Mouse.Button1Up:connect(function()
  312. MouseDown = false
  313. end)
  314.  
  315. Mouse.KeyDown:connect(function(key)
  316. local key = type(key) == "string" and key:lower() or ""
  317. if key == "r" then
  318. print = function() end
  319. script:Destroy()
  320. for i, v in pairs(getfenv()) do pcall(function() v:Destroy() end) getfenv()[i] = nil end
  321. end
  322. end)
  323.  
  324. Mouse.Button2Down:connect(function()
  325. if not Mouse2Down then
  326. Mouse2Tick = tick()
  327. Mouse2Down = true
  328. coroutine.wrap(function()
  329. for i = 1.1, 0, -0.1 do if Mouse2Down then b.Color = Color3.new(0, 0, i) end wait(0.01) end
  330. for i = 0, 1.1, 0.1 do if Mouse2Down then b.Color = Color3.new(i, 0, 0) end wait(0.01) end
  331. end)()
  332. coroutine.wrap(function()
  333. for i = 15, 25 do if Mouse2Down then b.Size = Vector3.new(i, i, i) b.CFrame = CFrame.new(LocalPlayer.Character.Torso.Position) end wait(0.05) end
  334. end)()
  335. end
  336. end)
  337.  
  338. Mouse.Button2Up:connect(function()
  339. if Mouse2Down then
  340. if math.floor(tick() - Mouse2Tick) > 1 then
  341. Mouse2Down = false
  342. coroutine.wrap(function()
  343. for i = 1.1, 0, -0.1 do if not Mouse2Down then b.Color = Color3.new(i, 0, 0) end wait(0.01) end
  344. for i = 0, 1.1, 0.1 do if not Mouse2Down then b.Color = Color3.new(0, 0, i) end wait(0.01) end
  345. end)()
  346. coroutine.wrap(function()
  347. for i = 25, 15, -1 do if not Mouse2Down then b.Size = Vector3.new(i, i, i) b.CFrame = CFrame.new(LocalPlayer.Character.Torso.Position) end wait(0.05) end
  348. end)()
  349. end
  350. end
  351. end)
  352.  
  353. Mouse.KeyDown:connect(function(key)
  354. if key == "0" then
  355. ShiftDown = true
  356. elseif key == "1" or key == "2" then
  357. CtrlDown = true
  358. end
  359. end)
  360.  
  361. Mouse.KeyUp:connect(function(key)
  362. if key == "0" then
  363. ShiftDown = false
  364. elseif key == "1" or key == "2" then
  365. CtrlDown = false
  366. end
  367. end)
  368.  
  369. coroutine.wrap(function()
  370. while wait(0.05) do
  371. for i = 0.2, 0.8, 0.1 do
  372. b.Transparency = i
  373. wait(0.05)
  374. end
  375. for i = 0.7, 0.1, -0.1 do
  376. b.Transparency = i
  377. wait(0.05)
  378. end
  379. end
  380. end)()
  381.  
  382. game:service'RunService'.Stepped:connect(function()
  383. coroutine.resume(coroutine.create(function()
  384. b.CFrame = CFrame.new(LocalPlayer.Character.Torso.Position)
  385. end))
  386. coroutine.resume(coroutine.create(function()
  387. for i, v in pairs(Touched) do
  388. if v.Parent == nil or v == nil then
  389. table.remove(Touched, i)
  390. end
  391. end
  392. end))
  393. coroutine.resume(coroutine.create(function()
  394. local Height = LocalPlayer.Character.Torso.CFrame.y - 3.5
  395. if ShiftDown then
  396. Height = Height - 0.25
  397. if CtrlDown then
  398. Height = Height - 0.75
  399. end
  400. end
  401. local TargetCFrame = LocalPlayer.Character.Torso.CFrame
  402. local TargetAngle = LocalPlayer.Character.Torso.CFrame.lookVector
  403. Platform.Parent = game:service'Workspace'.CurrentCamera
  404. Platform.CFrame = CFrame.new(TargetCFrame.x, Height, TargetCFrame.z)
  405. Platform.CanCollide = true
  406. LocalPlayer.Character.Torso.CFrame = TargetCFrame * CFrame.new(0, -(TargetCFrame.y) + Height + 3.5, 0)
  407. end))
  408. coroutine.resume(coroutine.create(function()
  409. if LocalPlayer.Parent ~= nil then
  410. for i, v in pairs(GetRecursiveChildren(LocalPlayer.Character)) do
  411. if v.className == "Part" then v.CanCollide = false end
  412. end
  413. end
  414. end))
  415. coroutine.resume(coroutine.create(function()
  416. if MouseDown and not MouseDeb and not Mouse2Down then
  417. MouseDeb = true
  418. coroutine.wrap(function() wait(1) MouseDeb = false end)()
  419. local dist = Instance.new("Part")
  420. dist.CFrame = CFrame.new(LocalPlayer.Character.Torso.Position)
  421. dist.formFactor = "Custom"
  422. dist.Shape = "Ball"
  423. dist.Name = "WillNotBeRemoved"
  424. dist.Transparency = 0
  425. dist.Reflectance = 0.1
  426. dist.Size = Vector3.new(10, 10, 10)
  427. dist.BrickColor = BrickColor.new("New Yeller")
  428. dist.TopSurface = "Smooth"
  429. dist.Anchored = true
  430. dist.BottomSurface = "Smooth"
  431. dist.Locked = true
  432. dist.CanCollide = false
  433. dist.Parent = game:service'Workspace'
  434. dist.Touched:connect(function(obj)
  435. coroutine.resume(coroutine.create(function()
  436. local Player = GetPlayer(obj)
  437. if Player and Player ~= LocalPlayer and Player.Character and Player.Character:FindFirstChild("Torso") then
  438. local BV = Instance.new("BodyVelocity", Player.Character.Torso)
  439. BV.maxForce = Vector3.new(1/0, 1/0, 1/0)
  440. BV.velocity = ((LocalPlayer.Character.Torso.Position - Player.Character.Torso.Position).unit * -50)
  441. game:service'Debris':AddItem(BV, 1)
  442. elseif not Player and obj ~= b and obj.Name ~= "Base" and not obj:IsDescendantOf(game:service'Workspace'.CurrentCamera) then
  443. obj:BreakJoints()
  444. obj.Anchored = false
  445. obj.CanCollide = false
  446. local BV = Instance.new("BodyVelocity", obj)
  447. BV.maxForce = Vector3.new(1/0, 1/0, 1/0)
  448. BV.velocity = ((LocalPlayer.Character.Torso.Position - obj.Position).unit * -50)
  449. game:service'Debris':AddItem(BV, 1)
  450. end
  451. end))
  452. end)
  453. coroutine.wrap(function()
  454. for i = 1, 100 do
  455. dist.Transparency = dist.Transparency + 0.01
  456. dist.Size = dist.Size + Vector3.new(1, 1, 1)
  457. dist.CFrame = CFrame.new(LocalPlayer.Character.Torso.Position)
  458. wait()
  459. end
  460. game:service'Debris':AddItem(dist, 0)
  461. end)()
  462. end
  463. end))
  464. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement