Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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 = {}
- do
- script.Parent = owner.Character
- local Event = Instance.new("RemoteEvent");Event.Name = "UserInput"
- local function NewFakeEvent()
- local Bind = Instance.new("BindableEvent")
- local Fake;Fake = {Connections = {},
- fakeEvent=true;
- Connect=function(self,Func)
- Bind.Event:connect(Func)
- self.Connections[Bind] = true
- return setmetatable({Connected = true},{
- __index = function (self,Index)
- if Index:lower() == "disconnect" then
- return function() Fake.Connections[Bind] = false;self.Connected = false end
- end
- return Fake[Index]
- end;
- __tostring = function() return "Connection" end;
- })
- end}
- Fake.connect = Fake.Connect;return Fake;
- end
- local Mouse = {Target=nil,Hit=CFrame.new(),KeyUp=NewFakeEvent(),KeyDown=NewFakeEvent(),Button1Up=NewFakeEvent(),Button1Down=NewFakeEvent()}
- local UserInputService = {InputBegan=NewFakeEvent(),InputEnded=NewFakeEvent()}
- local ContextActionService = {Actions={},BindAction = function(self,actionName,Func,touch,...)
- self.Actions[actionName] = Func and {Name=actionName,Function=Func,Keys={...}} or nil
- end};ContextActionService.UnBindAction = ContextActionService.BindAction
- local function TriggerEvent(self,Event,...)
- local Trigger = Mouse[Event]
- if Trigger and Trigger.fakeEvent and Trigger.Connections then
- for Connection,Active in pairs(Trigger.Connections) do if Active then Connection:Fire(...) end end
- end
- end
- Mouse.TrigEvent = TriggerEvent;UserInputService.TrigEvent = TriggerEvent
- Event.OnServerEvent:Connect(function(FiredBy,Input)
- if FiredBy.Name ~= owner.Name then return end
- if Input.MouseEvent then
- Mouse.Target = Input.Target;Mouse.Hit = Input.Hit
- else
- local Begin = Input.UserInputState == Enum.UserInputState.Begin
- if Input.UserInputType == Enum.UserInputType.MouseButton1 then return Mouse:TrigEvent(Begin and "Button1Down" or "Button1Up") end
- for _,Action in pairs(ContextActionService.Actions) do
- for _,Key in pairs(Action.Keys) do if Key==Input.KeyCode then Action.Function(Action.Name,Input.UserInputState,Input) end end
- end
- Mouse:TrigEvent(Begin and "KeyDown" or "KeyUp",Input.KeyCode.Name:lower())
- UserInputService:TrigEvent(Begin and "InputBegan" or "InputEnded",Input,false)
- end
- end)
- InternalData["Mouse"] = Mouse;InternalData["ContextActionService"] = ContextActionService;InternalData["UserInputService"] = UserInputService
- Event.Parent = NLS([[
- local Player = owner;local Event = script:WaitForChild("UserInput");local UserInputService = game:GetService("UserInputService");local Mouse = Player:GetMouse()
- local Input = function(Input,gameProcessedEvent)
- if gameProcessedEvent then return end
- Event:FireServer({KeyCode=Input.KeyCode,UserInputType=Input.UserInputType,UserInputState=Input.UserInputState})
- end
- UserInputService.InputBegan:Connect(Input);UserInputService.InputEnded:Connect(Input)
- local Hit,Target
- while wait(1/30) do
- if Hit ~= Mouse.Hit or Target ~= Mouse.Target then
- Hit,Target = Mouse.Hit,Mouse.Target;Event:FireServer({["MouseEvent"]=true,["Target"]=Target,["Hit"]=Hit})
- end
- end
- ]],owner.Character)
- end
- RealGame = game;game = setmetatable({},{
- __index = function (self,Index)
- local Sandbox = function (Thing)
- if Thing:IsA("Player") then
- local RealPlayer = Thing
- return setmetatable({},{
- __index = function (self,Index)
- local Type = type(RealPlayer[Index])
- if Type == "function" then
- if Index:lower() == "getmouse" or Index:lower() == "mouse" then
- return function (self)return InternalData["Mouse"] end
- end
- return function (self,...)return RealPlayer[Index](RealPlayer,...) end
- end
- return RealPlayer[Index]
- end;
- __tostring = function(self) return RealPlayer.Name end
- })
- end
- end
- if RealGame[Index] then
- local Type = type(RealGame[Index])
- if Type == "function" then
- if Index:lower() == "getservice" or Index:lower() == "service" then
- return function (self,Service)
- local FakeServices = {
- ["players"] = function()
- return setmetatable({},{
- __index = function (self2,Index2)
- local RealService = RealGame:GetService(Service)
- local Type2 = type(Index2)
- if Type2 == "function" then
- return function (self,...) return RealService[Index2](RealService,...)end
- else
- if Index2:lower() == "localplayer" then return Sandbox(owner) end
- return RealService[Index2]
- end
- end;
- __tostring = function(self) return RealGame:GetService(Service).Name end
- })
- end;
- ["contextactionservice"] = function() return InternalData["ContextActionService"] end;
- ["userinputservice"] = function() return InternalData["UserInputService"] end;
- ["runservice"] = function()
- return setmetatable({},{
- __index = function(self2,Index2)
- local RealService = RealGame:GetService(Service)
- local Type2 = type(Index2)
- if Type2 == "function" then
- return function (self,...) return RealService[Index2](RealService,...) end
- else
- local RunServices = {
- ["bindtorenderstep"] = function() return function (self,Name,Priority,Function) return RealGame:GetService("RunService").Stepped:Connect(Function) end end;
- ["renderstepped"] = function() return RealService["Stepped"] end
- }
- if RunServices[Index2:lower()] then return RunServices[Index2:lower()]() end
- return RealService[Index2]
- end
- end
- })
- end
- }
- if FakeServices[Service:lower()] then return FakeServices[Service:lower()]() end
- return RealGame:GetService(Service)
- end
- end
- return function (self,...) return RealGame[Index](RealGame,...) end
- else
- if game:GetService(Index) then return game:GetService(Index) end
- return RealGame[Index]
- end
- end
- return nil
- end
- });Game = game;owner = game:GetService("Players").LocalPlayer;script = Instance.new("Script");print("Complete! Running...")
- --[[
- Script shared by ProFiGames KISS ME ]]
- me = game.Players.LocalPlayer
- local h = Instance.new("HopperBin",me.Backpack)
- h.Name = "Portal"
- script.Parent = h
- bin = script.Parent
- mode = true
- hold = false
- function prop(part, parent, collide, tran, ref, x, y, z, color, anchor, form)
- part.Parent = parent
- part.formFactor = form
- part.CanCollide = collide
- part.Transparency = tran
- part.Reflectance = ref
- part.Size = Vector3.new(x,y,z)
- part.BrickColor = BrickColor.new(color)
- part.TopSurface = 0
- part.BottomSurface = 0
- part.Anchored = anchor
- part:BreakJoints()
- end
- function weld(w, p, p0, p1, a, b, c, x, y, z)
- w.Parent = p
- w.Part0 = p0
- w.Part1 = p1
- w.C1 = CFrame.fromEulerAnglesXYZ(a,b,c) * CFrame.new(x,y,z)
- end
- function mesh(mesh, parent, x, y, z, type)
- mesh.Parent = parent
- mesh.Scale = Vector3.new(x, y, z)
- mesh.MeshType = type
- end
- out = false
- inn = false
- function sel(mouse)
- local mk = nil
- local km = nil
- mouse.Button1Down:connect(function()
- if mode then
- if inn == false then
- inn = true
- mode = false
- hold = true
- local holdpos = mouse.Hit.p + Vector3.new(0,4,0)
- local portal = Instance.new("Model",workspace)
- portal.Name = "InPortal"
- local main = Instance.new("Part")
- prop(main, portal, false, 0.1, 0.1, 2.4, 2.4, 0.6, "Medium blue", true, "Custom")
- main.CFrame = CFrame.new(holdpos,mouse.Hit.p) * CFrame.new(0,3,0)
- local mes = Instance.new("SpecialMesh")
- mesh(mes,main,7,7,4,"FileMesh")
- mes.MeshId = "http://www.roblox.com/asset/?id=3270017"
- local f = Instance.new("Fire",main)
- f.Size = 7
- f.Heat = 0
- f.Color = Color3.new(0.1,0.2,1)
- f.SecondaryColor = Color3.new(0.4,0.4,0.6)
- while hold do
- wait()
- main.CFrame = CFrame.new(holdpos,mouse.Hit.p)
- end
- mk = main
- end
- else
- if inn == true and out == false then
- out = true
- mode = true
- hold = true
- local holdpos = mouse.Hit.p + Vector3.new(0,4,0)
- local portal = Instance.new("Model",workspace)
- portal.Name = "OutPortal"
- local main = Instance.new("Part")
- prop(main, portal, false, 0.1, 0.1, 2.4, 2.4, 0.6, "Neon orange", true, "Custom")
- main.CFrame = CFrame.new(holdpos,mouse.Hit.p) * CFrame.new(0,3,0)
- local mes = Instance.new("SpecialMesh")
- mesh(mes,main,7,7,4,"FileMesh")
- mes.MeshId = "http://www.roblox.com/asset/?id=3270017"
- local f = Instance.new("Fire",main)
- f.Size = 7
- f.Heat = 0
- f.Color = Color3.new(1,0.2,0.1)
- f.SecondaryColor = Color3.new(0.8,0.1,0.08)
- km = main
- hold = true
- while hold do
- wait()
- main.CFrame = CFrame.new(holdpos,mouse.Hit.p)
- end
- local tuch = true
- mk.Touched:connect(function(hit)
- local pla = game.Players:findFirstChild(hit.Parent.Name)
- if pla then
- if tuch then
- tuch = false
- local ff = Instance.new("Part")
- prop(ff,me.Character,false,1,0.2,2.3,2.3,1,"Medium blue",true,"Custom")
- local mag = (mk.Position - main.Position).magnitude
- ff.Size = Vector3.new(2.3,2.3,1)
- ff.CFrame = CFrame.new(mk.Position, main.Position) * CFrame.new(0,0,-mag/2)
- local mee = Instance.new("SpecialMesh",ff)
- mee.MeshType = "Brick"
- mee.Scale = Vector3.new(0.65,0.65,mag)
- for i=0.1, 1.1, 0.05 do
- mk.Transparency = i
- ff.Transparency = ff.Transparency - 0.04
- mee.Scale = Vector3.new(math.random(5,130)/100,math.random(5,130)/100,mag)
- wait()
- end
- pla.Character.Torso.CFrame = main.CFrame * CFrame.new(0,0,-3)
- for i=0.1,1.1,0.05 do
- main.Transparency = i
- ff.Transparency = ff.Transparency + 0.08
- mee.Scale = Vector3.new(math.random(30,120)/100,math.random(30,120)/100,mag)
- wait()
- end
- ff:remove()
- main:remove()
- mk:remove()
- mk = nil
- inn = false
- out = false
- end
- end
- end)
- end
- end
- end)
- mouse.Button1Up:connect(function()
- hold = false
- end)
- mouse.KeyDown:connect(function(key)
- key = key:lower()
- if (key == "q") then
- mode = true
- if mk ~= nil then
- mk:remove()
- mk = nil
- inn = false
- end
- if km ~= nil then
- km:remove()
- km = nil
- out = false
- end
- end
- end)
- end
- bin.Selected:connect(sel)
- --mediafire
Advertisement
Add Comment
Please, Sign In to add comment