Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --https://github.com/Mokiros/roblox-FE-compatibility
- if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
- local Player,game,owner = owner,game
- local RealPlayer = Player
- do print("FE Compatibility code V2 by Mokiros")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
- local me = game.Players.LocalPlayer
- local character = me.Character
- local mouse = me:GetMouse()
- local sqa = Instance.new("Part", character)
- sqa.Name = "SquareAura"
- sqa.Shape = "Ball"
- sqa.Size = Vector3.new(6, 6, 6)
- sqa.Transparency = 0.3
- sqa.TopSurface = "Smooth"
- sqa.BottomSurface = "Smooth"
- sqa.CanCollide = false
- sqa.Anchored = true
- local sqb = Instance.new("Part", character)
- sqb.Name = "SquareField"
- sqb.Size = Vector3.new(6, 6, 6)
- sqb.Transparency = 1
- sqb.TopSurface = "Smooth"
- sqb.BottomSurface = "Smooth"
- sqb.CanCollide = false
- sqb.Anchored = true
- sqb.Touched:connect(function(part)
- if part.Parent == character then
- return false
- elseif part.Name == "Handle" then
- return false
- else
- part:Destroy()
- end
- end)
- coroutine.resume(coroutine.create(function()
- rot = 0
- size = 0
- while wait(0.01) do
- rot = rot + 1
- size = size + 0.1
- r = ((math.sin(rot/20))*100)+128
- g = ((math.sin(rot/20+40))*100)+128
- b = ((math.sin(rot/20+60))*100)+128
- sqa.Color = Color3.new(r/255,g/255,b/255)
- sqa.Size = sqa.Size + Vector3.new(math.sin(size)/5, math.sin(size)/5, math.sin(size)/5)
- sqa.CFrame = character.Torso.CFrame * CFrame.Angles(math.rad(rot), math.rad(rot), math.rad(rot))
- sqb.CFrame = character.Torso.CFrame
- end
- end))
- function fP(Player)
- for i,v in pairs(game:GetService("Players"):GetPlayers()) do
- if v.Name:lower():match(Player:lower()) then
- return v
- else
- return false
- end
- end
- end
- function CreateCircle(offset,angle)
- if not offset then
- offset = Vector3.new(0, 0, 0)
- end
- if not angle then
- angle = CFrame.Angles(0, 0, 0)
- end
- local m = Instance.new("Model", character)
- m.Name = "Circle"
- for i = 1, 20 do
- local p = Instance.new("Part")
- p.Anchored = true
- p.Size = Vector3.new(2, 2, 2)
- p.TopSurface,p.BottomSurface = "Smooth","Smooth"
- p.CanCollide = false
- p.CFrame = character.Torso.CFrame * CFrame.Angles(0, math.pi*20, 0)
- p.CFrame = p.CFrame * angle * CFrame.Angles(0, math.rad(i*18), 0) * CFrame.new(0, 0, 5) + offset
- p.BrickColor = BrickColor.Black()
- p.Transparency = 0.3
- local bf = Instance.new("BodyVelocity", p)
- bf.Velocity = -(p.CFrame.lookVector) * 200
- wait(1/90)
- p.Parent = m
- p.Touched:connect(function(part)
- if part.Parent then
- if part.Parent.ClassName == "Model" then
- plyr = fP(part.Parent.Name)
- if plyr then
- if plyr.Name ~= me.Name then
- plyr.Character.Humanoid.Health = plyr.Character.Humanoid.Health - 40
- else
- return false
- end
- else
- local hum = part.Parent:findFirstChild("Humanoid")
- if hum then
- hum.Health = hum.Health - 40
- else
- return false
- end
- end
- end
- else
- return false
- end
- end)
- end
- wait(.25)
- for i,v in pairs(m:GetChildren()) do
- v.Anchored = false
- wait(1/60)
- end
- wait(.5)
- m:Destroy()
- end
- function InflateLaser(part)
- for i = 1, 10 do
- if part.Name:match("Laser") then
- part.Size = part.Size + Vector3.new(0.2, 0.5, 0)
- wait(1/60)
- end
- end
- end
- function iSL(part)
- for i = 1, 10 do
- if part.Name:match("Laser") then
- part.Size = part.Size + Vector3.new(1, 0, 1)
- wait(1/60)
- end
- end
- end
- function dSL(part)
- for i = 1, 10 do
- if part.Name:match("Laser") then
- part.Size = part.Size - Vector3.new(1, 0, 1)
- wait(1/60)
- end
- end
- part:Destroy()
- end
- function DeflateLaser(part)
- for i = 1, 10 do
- if part.Name:match("Laser") then
- part.Size = part.Size - Vector3.new(0.2, 0.5, 0)
- wait(1/60)
- end
- end
- part:Destroy()
- end
- function CreateLaser()
- local m = Instance.new("Model", character)
- m.Name = "Lasers"
- for i = 1, 8 do
- local p = Instance.new("Part", m)
- p.Size = Vector3.new(3, 6, 1)
- p.Anchored = true
- p.CanCollide = false
- p.TopSurface,p.BottomSurface = "Smooth","Smooth"
- p.Name = "Block"..i
- p.BrickColor = BrickColor.new("Really black")
- p.CFrame = character.Torso.CFrame * CFrame.Angles(0, math.rad(i*45), 0) * CFrame.new(0, 0, 6)
- local p2 = Instance.new("Part", m)
- p2.Name = "Laser"..i
- p2.Size = Vector3.new(0.1, 0.1, 1000)
- p2.Anchored = true
- p2.CFrame = p.CFrame * CFrame.new(0, 0, 500)
- p2.Transparency = 0.3
- p2.TopSurface,p2.BottomSurface = "Smooth","Smooth"
- p2.BrickColor = BrickColor.new("New Yeller")
- p2.CanCollide = false
- local w1 = Instance.new("Weld", p)
- w1.Part0 = p2
- w1.Part1 = p
- p2.Touched:connect(function(part)
- if part.Parent.ClassName == "Model" then
- plyr = fP(part.Parent.Name)
- if plyr then
- if plyr.Name ~= me.Name then
- plyr.Character.Humanoid.Health = plyr.Character.Humanoid.Health - 40
- else
- return false
- end
- else
- local hum = part.Parent:findFirstChild("Humanoid")
- if hum then
- hum.Health = hum.Health - 40
- else
- return false
- end
- end
- end
- end)
- end
- wait(0.25)
- for i,v in pairs(m:GetChildren()) do
- InflateLaser(v)
- end
- wait(1)
- for i,v in pairs(m:GetChildren()) do
- DeflateLaser(v)
- end
- wait(2)
- m:Destroy()
- end
- function CreatePlatform()
- local plat = Instance.new("Part", character)
- plat.Size = Vector3.new(8, 1, 8)
- plat.TopSurface,plat.BottomSurface = "Smooth","Smooth"
- plat.Anchored = true
- plat.Color = sqa.Color
- plat.CFrame = character.Torso.CFrame * CFrame.new(0, -3, 0)
- plat.Transparency = 0.4
- wait(2)
- plat:Destroy()
- end
- function CreatePPlatform()
- local plat = Instance.new("Part", character)
- plat.Size = Vector3.new(12, 1, 12)
- plat.TopSurface,plat.BottomSurface = "Smooth","Smooth"
- plat.Anchored = true
- plat.Color = sqa.Color
- plat.CFrame = character.Torso.CFrame * CFrame.new(0, -3, 0)
- plat.Transparency = 0.4
- end
- function SkyLasers()
- for i = 1, math.random(5, 8) do
- local p = Instance.new("Part", character)
- p.Size = Vector3.new(0.1, 1000, 0.1)
- p.Anchored = true
- p.Name = "Laser"..i
- p.TopSurface,p.BottomSurface = "Smooth","Smooth"
- p.BrickColor = BrickColor.new("New Yeller")
- p.Transparency = 0.5
- p.CanCollide = false
- p.CFrame = character.Torso.CFrame * CFrame.new(math.random(-20, 20), 500-character.Torso.CFrame.y, math.random(-20, 20))
- p.Touched:connect(function(part)
- if part.Parent.ClassName == "Model" then
- plyr = fP(part.Parent.Name)
- if plyr then
- if plyr.Name ~= me.Name then
- plyr.Character.Humanoid.Health = plyr.Character.Humanoid.Health - 40
- else
- return false
- end
- else
- local hum = part.Parent:findFirstChild("Humanoid")
- if hum then
- hum.Health = hum.Health - 40
- else
- return false
- end
- end
- end
- end)
- iSL(p)
- wait(1)
- dSL(p)
- end
- end
- mouse.KeyDown:connect(function(key)
- if key == "r" then
- CreateCircle()
- elseif key == "l" then
- CreateLaser()
- elseif key == "p" then
- CreatePlatform()
- elseif key == "q" then
- for i = 1, 4 do
- local off = Vector3.new(math.random(-20, 20), 0, math.random(-20, 20))
- CreateCircle(off)
- end
- elseif key == "[" then
- CreatePPlatform()
- elseif key == "e" then
- SkyLasers()
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement