daily pastebin goal
29%
SHARE
TWEET

LOL

a guest Mar 22nd, 2019 96 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- This script has convert to FE by who i don't know?
  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,game,owner = owner,game
  6. local RealPlayer = Player
  7. do
  8.     print("FE Compatibility code by Mokiros | Showcase by Bacon Hair!")
  9.     local rp = RealPlayer
  10.     script.Parent = rp.Character
  11.    
  12.     --RemoteEvent for communicating
  13.     local Event = Instance.new("RemoteEvent")
  14.     Event.Name = "UserInput_Event"
  15.  
  16.     --Fake event to make stuff like Mouse.KeyDown work
  17.     local function fakeEvent()
  18.         local t = {_fakeEvent=true,Functions={},Connect=function(self,f)table.insert(self.Functions,f) end}
  19.         t.connect = t.Connect
  20.         return t
  21.     end
  22.  
  23.     --Creating fake input objects with fake variables
  24.     local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  25.     local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  26.     local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  27.         CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  28.     end}
  29.     --Merged 2 functions into one by checking amount of arguments
  30.     CAS.UnbindAction = CAS.BindAction
  31.  
  32.     --This function will trigger the events that have been :Connect()'ed
  33.     local function te(self,ev,...)
  34.         local t = m[ev]
  35.         if t and t._fakeEvent then
  36.             for _,f in pairs(t.Functions) do
  37.                 f(...)
  38.             end
  39.         end
  40.     end
  41.     m.TrigEvent = te
  42.     UIS.TrigEvent = te
  43.  
  44.     Event.OnServerEvent:Connect(function(plr,io)
  45.         if plr~=rp then return end
  46.         m.Target = io.Target
  47.         m.Hit = io.Hit
  48.         if not io.isMouse then
  49.             local b = io.UserInputState == Enum.UserInputState.Begin
  50.             if io.UserInputType == Enum.UserInputType.MouseButton1 then
  51.                 return m:TrigEvent(b and "Button1Down" or "Button1Up")
  52.             end
  53.             for _,t in pairs(CAS.Actions) do
  54.                 for _,k in pairs(t.Keys) do
  55.                     if k==io.KeyCode then
  56.                         t.Function(t.Name,io.UserInputState,io)
  57.                     end
  58.                 end
  59.             end
  60.             m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  61.             UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  62.         end
  63.     end)
  64.     Event.Parent = NLS([==[
  65.     local Player = game:GetService("Players").LocalPlayer
  66.     local Event = script:WaitForChild("UserInput_Event")
  67.  
  68.     local Mouse = Player:GetMouse()
  69.     local UIS = game:GetService("UserInputService")
  70.     local input = function(io,a)
  71.         if a then return end
  72.         --Since InputObject is a client-side instance, we create and pass table instead
  73.         Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  74.     end
  75.     UIS.InputBegan:Connect(input)
  76.     UIS.InputEnded:Connect(input)
  77.  
  78.     local h,t
  79.     --Give the server mouse data 30 times every second, but only if the values changed
  80.     --If player is not moving their mouse, client won't fire events
  81.     while wait(1/30) do
  82.         if h~=Mouse.Hit or t~=Mouse.Target then
  83.             h,t=Mouse.Hit,Mouse.Target
  84.             Event:FireServer({isMouse=true,Target=t,Hit=h})
  85.         end
  86.     end]==],Player.Character)
  87.  
  88.     ----Sandboxed game object that allows the usage of client-side methods and services
  89.     --Real game object
  90.     local _rg = game
  91.  
  92.     --Metatable for fake service
  93.     local fsmt = {
  94.         __index = function(self,k)
  95.             local s = rawget(self,"_RealService")
  96.             if s then return s[k] end
  97.         end,
  98.         __newindex = function(self,k,v)
  99.             local s = rawget(self,"_RealService")
  100.             if s then s[k]=v end
  101.         end,
  102.         __call = function(self,...)
  103.             local s = rawget(self,"_RealService")
  104.             if s then return s(...) end
  105.         end
  106.     }
  107.     local function FakeService(t,RealService)
  108.         t._RealService = typeof(RealService)=="string" and _rg:GetService(RealService) or RealService
  109.         return setmetatable(t,fsmt)
  110.     end
  111.  
  112.     --Fake game object
  113.     local g = {
  114.         GetService = function(self,s)
  115.             return self[s]
  116.         end,
  117.         Players = FakeService({
  118.             LocalPlayer = FakeService({GetMouse=function(self)return m end},Player)
  119.         },"Players"),
  120.         UserInputService = FakeService(UIS,"UserInputService"),
  121.         ContextActionService = FakeService(CAS,"ContextActionService"),
  122.     }
  123.     rawset(g.Players,"localPlayer",g.Players.LocalPlayer)
  124.     g.service = g.GetService
  125.    
  126.     g.RunService = FakeService({
  127.         RenderStepped = _rg:GetService("RunService").Heartbeat,
  128.         BindToRenderStep = function(self,name,_,fun)
  129.  
  130.         end,
  131.         UnbindFromRenderStep = function(self,name)
  132.             self._btrs[name]:Disconnect()
  133.         end,
  134.     },"RunService")
  135.  
  136.     setmetatable(g,{
  137.         __index=function(self,s)
  138.             return _rg:GetService(s) or typeof(_rg[s])=="function"
  139.             and function(_,...)return _rg[s](_rg,...)end or _rg[s]
  140.         end,
  141.         __newindex = fsmt.__newindex,
  142.         __call = fsmt.__call
  143.     })
  144.     --Changing owner to fake player object to support owner:GetMouse()
  145.     game,owner = g,g.Players.LocalPlayer
  146. end
  147. wait()
  148. script.Name = "_.:| E-Shield |:._"
  149. --script.Parent = _EShield_
  150. local LocalPlayer = game:service'Players'.LocalPlayer
  151. local b, Platform = nil
  152. local PlayerOnly = false
  153. local Touched = {}
  154. local Mouse = LocalPlayer:GetMouse()
  155. local ShiftDown, CtrlDown, MouseDown, Mouse2Down, MouseDeb, Mouse2Tick = false, false, false, false, false, 0
  156.  
  157. function Create()
  158. if b then pcall(function() b:Destroy() end) end
  159. if Platform then pcall(function() Platform:Destroy() end) end
  160. local t = LocalPlayer.Character:FindFirstChild("Torso")
  161. local posit = Vector3.new(0, 50, 0)
  162. if t then posit = t.Position end
  163. Platform = Instance.new("Part")
  164. Platform.formFactor = "Custom"
  165. Platform.Size = Vector3.new(10, 1, 10)
  166. Platform.Transparency = 1
  167. Platform.Anchored = true
  168. Platform.CanCollide = true
  169. b = Instance.new("Part", game:service'Workspace')
  170. b.Position = posit
  171. b.Shape = "Ball"
  172. b.Transparency = 0
  173. b.Anchored = true
  174. b.Reflectance = 0.3
  175. b.Size = Mouse2Down and Vector3.new(25, 25, 25) or Vector3.new(15, 15, 15)
  176. b.Color = Mouse2Down and Color3.new(1, 0, 0) or Color3.new(0, 0, 1)
  177. b.TopSurface = "Smooth"
  178. b.BottomSurface = "Smooth"
  179. b.Locked = true
  180. b.CanCollide = false
  181. b.Changed:connect(function(w)
  182. if w == "Parent" then
  183. Create()
  184. end
  185. end)
  186. b.Touched:connect(function(obj)
  187. 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
  188. table.insert(Touched, obj)
  189. if PlayerOnly then
  190. if GetPlayer(obj) then
  191. Destroying(obj)
  192. end
  193. else
  194. Destroying(obj)
  195. end
  196. end
  197. end)
  198. end
  199.  
  200. function GetRecursiveChildren(Parent)
  201.     local ret = {}
  202.     for i, v in pairs(Parent:GetChildren()) do
  203.         if #v:GetChildren() > 0 then
  204.             local childs = GetRecursiveChildren(v)
  205.             for i1, v1 in pairs(childs) do
  206.                 ret[#ret + 1] = v1
  207.             end
  208.         end    
  209.         ret[#ret + 1] = v
  210.     end
  211.     return ret
  212. end
  213.  
  214. function GetPlayer(Target)
  215. for _,v in pairs(game:service'Players':GetPlayers()) do
  216. if v.Character ~= nil and Target:IsDescendantOf(v.Character) then
  217. return v
  218. end
  219. end
  220. return nil
  221. end
  222.  
  223. function TouchedStatus(Target)
  224. for _,v in pairs(Touched) do
  225. if v == Target then
  226. return true
  227. end
  228. end
  229. return false
  230. end
  231.  
  232. function Destroying(obj)
  233. local ran, err = coroutine.resume(coroutine.create(function()
  234. if not Mouse2Down then
  235. obj:BreakJoints()
  236. obj.CanCollide = false
  237. obj.Anchored = false
  238. obj.formFactor = "Custom"
  239. obj.Size = obj.Size * Vector3.new(math.random(), math.random(), math.random())
  240. local bp = Instance.new("BodyPosition")
  241. bp.maxForce = Vector3.new(1/0,1/0,1/0)
  242. bp.Parent = obj
  243. local X, Y, Z = nil, nil, nil
  244. coroutine.wrap(function()
  245. while obj and obj.Parent do
  246. X, Y, Z = math.random(-5, 5), math.random(-5, 5), math.random(-5, 5)
  247. wait(0.3)
  248. end
  249. end)()
  250. coroutine.wrap(function()
  251. while obj and obj.Parent do
  252. bp.position = LocalPlayer.Character.Torso.Position + Vector3.new(X, Y, Z)
  253. wait()
  254. end
  255. end)()
  256. coroutine.wrap(function()
  257. local transp = 0
  258. for i = 1, 50 do
  259. transp = transp + 0.02
  260. obj.Transparency = transp
  261. wait(0.05)
  262. end
  263. game:service'Debris':AddItem(obj, 0)
  264. end)()
  265. elseif Mouse2Down then
  266. local selbox = Instance.new("SelectionBox", obj)
  267. selbox.Adornee = obj
  268. selbox.Color = BrickColor.new("Really red")
  269. selbox.Transparency = 0
  270. wait(2)
  271. coroutine.wrap(function()
  272. local transp = 0
  273. local Size, Position = obj.Size, obj.Position
  274. local brickTable = {}
  275. game:service'Debris':AddItem(obj, 0)
  276. for i = 1, math.random(2, 4) do
  277. local x, y, z = math.random(), math.random(), math.random()
  278. local Brick = Instance.new("Part")
  279. Brick.Name = "WillNotBeRemoved"
  280. Brick.Parent = game:service'Workspace'
  281. Brick.BrickColor = BrickColor.new("White")
  282. Brick.Size = Size * Vector3.new(x, y, z)
  283. Brick.CFrame = CFrame.new(Position) * CFrame.Angles( x * 180, y * 180, z * 180)
  284. Brick.Locked = true
  285. Brick.Anchored = false
  286. Brick.CanCollide = false
  287. local Selection = Instance.new("SelectionBox", Brick)
  288. Selection.Adornee = Brick
  289. Selection.Color = BrickColor.new("White")
  290. Selection.Transparency = 0
  291. local BodyVelo = Instance.new("BodyVelocity", Brick)
  292. BodyVelo.maxForce = Vector3.new(1/0, 1/0, 1/0)
  293. BodyVelo.velocity = Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10))
  294. brickTable[#brickTable + 1] = {Brick, Selection}
  295. end
  296. for i = 1, 50 do
  297. transp = transp + 0.02
  298. for i1, v in pairs(brickTable) do
  299. v[1].Transparency = transp
  300. v[2].Transparency = transp
  301. end
  302. wait(0.05)
  303. end
  304. --for i, v in pairs(brickTable) do game:service'Debris':AddItem(v[1], 0) game:service'Debris':AddItem(v[2], 0) end
  305. end)()
  306. end
  307. end))
  308. if not ran then print(".:| EShield |:. " .. err) end
  309. end
  310.  
  311. Create()
  312.  
  313. Mouse.Button1Down:connect(function()
  314. MouseDown = true
  315. end)
  316.  
  317. Mouse.Button1Up:connect(function()
  318. MouseDown = false
  319. end)
  320.  
  321. Mouse.KeyDown:connect(function(key)
  322. local key = type(key) == "string" and key:lower() or ""
  323. if key == "r" then
  324. print = function() end
  325. script:Destroy()
  326. for i, v in pairs(getfenv()) do pcall(function() v:Destroy() end) getfenv()[i] = nil end
  327. end
  328. end)
  329.  
  330. Mouse.Button2Down:connect(function()
  331. if not Mouse2Down then
  332. Mouse2Tick = tick()
  333. Mouse2Down = true
  334. coroutine.wrap(function()
  335. for i = 1.1, 0, -0.1 do if Mouse2Down then b.Color = Color3.new(0, 0, i) end wait(0.01) end
  336. for i = 0, 1.1, 0.1 do if Mouse2Down then b.Color = Color3.new(i, 0, 0) end wait(0.01) end
  337. end)()
  338. coroutine.wrap(function()
  339. 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
  340. end)()
  341. end
  342. end)
  343.  
  344. Mouse.Button2Up:connect(function()
  345. if Mouse2Down then
  346. if math.floor(tick() - Mouse2Tick) > 1 then
  347. Mouse2Down = false
  348. coroutine.wrap(function()
  349. for i = 1.1, 0, -0.1 do if not Mouse2Down then b.Color = Color3.new(i, 0, 0) end wait(0.01) end
  350. for i = 0, 1.1, 0.1 do if not Mouse2Down then b.Color = Color3.new(0, 0, i) end wait(0.01) end
  351. end)()
  352. coroutine.wrap(function()
  353. 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
  354. end)()
  355. end
  356. end
  357. end)
  358.  
  359. Mouse.KeyDown:connect(function(key)
  360. if key == "0" then
  361. ShiftDown = true
  362. elseif key == "1" or key == "2" then
  363. CtrlDown = true
  364. end
  365. end)
  366.  
  367. Mouse.KeyUp:connect(function(key)
  368. if key == "0" then
  369. ShiftDown = false
  370. elseif key == "1" or key == "2" then
  371. CtrlDown = false
  372. end
  373. end)
  374.  
  375. coroutine.wrap(function()
  376. while wait(0.05) do
  377. for i = 0.2, 0.8, 0.1 do
  378. b.Transparency = i
  379. wait(0.05)
  380. end
  381. for i = 0.7, 0.1, -0.1 do
  382. b.Transparency = i
  383. wait(0.05)
  384. end
  385. end
  386. end)()
  387.  
  388. game:service'RunService'.Stepped:connect(function()
  389. coroutine.resume(coroutine.create(function()
  390. b.CFrame = CFrame.new(LocalPlayer.Character.Torso.Position)
  391. end))
  392. coroutine.resume(coroutine.create(function()
  393. for i, v in pairs(Touched) do
  394. if v.Parent == nil or v == nil then
  395. table.remove(Touched, i)
  396. end
  397. end
  398. end))
  399. coroutine.resume(coroutine.create(function()
  400. local Height = LocalPlayer.Character.Torso.CFrame.y - 3.5
  401. if ShiftDown then
  402. Height = Height - 0.25
  403. if CtrlDown then
  404. Height = Height - 0.75
  405. end
  406. end
  407. local TargetCFrame = LocalPlayer.Character.Torso.CFrame
  408. local TargetAngle = LocalPlayer.Character.Torso.CFrame.lookVector
  409. Platform.Parent = game:service'Workspace'.CurrentCamera
  410. Platform.CFrame = CFrame.new(TargetCFrame.x, Height, TargetCFrame.z)        
  411. Platform.CanCollide = true
  412. LocalPlayer.Character.Torso.CFrame = TargetCFrame * CFrame.new(0, -(TargetCFrame.y) + Height + 3.5, 0)
  413. end))
  414. coroutine.resume(coroutine.create(function()
  415. if LocalPlayer.Parent ~= nil then
  416. for i, v in pairs(GetRecursiveChildren(LocalPlayer.Character)) do
  417. if v.className == "Part" then v.CanCollide = false end
  418. end
  419. end
  420. end))
  421. coroutine.resume(coroutine.create(function()
  422. if MouseDown and not MouseDeb and not Mouse2Down then
  423. MouseDeb = true
  424. coroutine.wrap(function() wait(1) MouseDeb = false end)()
  425. local dist = Instance.new("Part")
  426. dist.CFrame = CFrame.new(LocalPlayer.Character.Torso.Position)
  427. dist.formFactor = "Custom"
  428. dist.Shape = "Ball"
  429. dist.Name = "WillNotBeRemoved"
  430. dist.Transparency = 0
  431. dist.Reflectance = 0.1
  432. dist.Size = Vector3.new(10, 10, 10)
  433. dist.BrickColor = BrickColor.new("New Yeller")
  434. dist.TopSurface = "Smooth"
  435. dist.Anchored = true
  436. dist.BottomSurface = "Smooth"
  437. dist.Locked = true
  438. dist.CanCollide = false
  439. dist.Parent = game:service'Workspace'
  440. dist.Touched:connect(function(obj)
  441. coroutine.resume(coroutine.create(function()
  442. local Player = GetPlayer(obj)
  443. if Player and Player ~= LocalPlayer and Player.Character and Player.Character:FindFirstChild("Torso") then
  444. local BV = Instance.new("BodyVelocity", Player.Character.Torso)
  445. BV.maxForce = Vector3.new(1/0, 1/0, 1/0)
  446. BV.velocity = ((LocalPlayer.Character.Torso.Position - Player.Character.Torso.Position).unit * -50)
  447. game:service'Debris':AddItem(BV, 1)
  448. elseif not Player and obj ~= b and obj.Name ~= "Base" and not obj:IsDescendantOf(game:service'Workspace'.CurrentCamera) then
  449. obj:BreakJoints()
  450. obj.Anchored = false
  451. obj.CanCollide = false
  452. local BV = Instance.new("BodyVelocity", obj)
  453. BV.maxForce = Vector3.new(1/0, 1/0, 1/0)
  454. BV.velocity = ((LocalPlayer.Character.Torso.Position - obj.Position).unit * -50)
  455. game:service'Debris':AddItem(BV, 1)
  456. end
  457. end))
  458. end)
  459. coroutine.wrap(function()
  460. for i = 1, 100 do
  461. dist.Transparency = dist.Transparency + 0.01
  462. dist.Size = dist.Size + Vector3.new(1, 1, 1)
  463. dist.CFrame = CFrame.new(LocalPlayer.Character.Torso.Position)
  464. wait()
  465. end
  466. game:service'Debris':AddItem(dist, 0)
  467. end)()
  468. end
  469. end))
  470. 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