SHOW:
|
|
- or go back to the newest paste.
| 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 | - | if script.Parent.className ~= "HopperBin" then |
| 6 | + | local Bind = Instance.new("BindableEvent")
|
| 7 | - | h = Instance.new("HopperBin",me.Backpack)
|
| 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 | ||
| 142 | --[[ | |
| 143 | Script shared by ProFiGames KISS ME ]] | |
| 144 | ||
| 145 | me = game.Players.LocalPlayer | |
| 146 | ||
| 147 | ||
| 148 | local h = Instance.new("HopperBin",me.Backpack)
| |
| 149 | h.Name = "Portal" | |
| 150 | script.Parent = h | |
| 151 | ||
| 152 | ||
| 153 | bin = script.Parent | |
| 154 | mode = true | |
| 155 | hold = false | |
| 156 | ||
| 157 | function prop(part, parent, collide, tran, ref, x, y, z, color, anchor, form) | |
| 158 | part.Parent = parent | |
| 159 | part.formFactor = form | |
| 160 | part.CanCollide = collide | |
| 161 | part.Transparency = tran | |
| 162 | part.Reflectance = ref | |
| 163 | part.Size = Vector3.new(x,y,z) | |
| 164 | part.BrickColor = BrickColor.new(color) | |
| 165 | part.TopSurface = 0 | |
| 166 | part.BottomSurface = 0 | |
| 167 | part.Anchored = anchor | |
| 168 | part:BreakJoints() | |
| 169 | end | |
| 170 | ||
| 171 | function weld(w, p, p0, p1, a, b, c, x, y, z) | |
| 172 | w.Parent = p | |
| 173 | w.Part0 = p0 | |
| 174 | w.Part1 = p1 | |
| 175 | w.C1 = CFrame.fromEulerAnglesXYZ(a,b,c) * CFrame.new(x,y,z) | |
| 176 | end | |
| 177 | ||
| 178 | function mesh(mesh, parent, x, y, z, type) | |
| 179 | mesh.Parent = parent | |
| 180 | mesh.Scale = Vector3.new(x, y, z) | |
| 181 | mesh.MeshType = type | |
| 182 | end | |
| 183 | ||
| 184 | out = false | |
| 185 | inn = false | |
| 186 | ||
| 187 | function sel(mouse) | |
| 188 | local mk = nil | |
| 189 | local km = nil | |
| 190 | mouse.Button1Down:connect(function() | |
| 191 | if mode then | |
| 192 | if inn == false then | |
| 193 | inn = true | |
| 194 | mode = false | |
| 195 | hold = true | |
| 196 | local holdpos = mouse.Hit.p + Vector3.new(0,4,0) | |
| 197 | local portal = Instance.new("Model",workspace)
| |
| 198 | portal.Name = "InPortal" | |
| 199 | local main = Instance.new("Part")
| |
| 200 | prop(main, portal, false, 0.1, 0.1, 2.4, 2.4, 0.6, "Medium blue", true, "Custom") | |
| 201 | main.CFrame = CFrame.new(holdpos,mouse.Hit.p) * CFrame.new(0,3,0) | |
| 202 | local mes = Instance.new("SpecialMesh")
| |
| 203 | mesh(mes,main,7,7,4,"FileMesh") | |
| 204 | mes.MeshId = "http://www.roblox.com/asset/?id=3270017" | |
| 205 | local f = Instance.new("Fire",main)
| |
| 206 | f.Size = 7 | |
| 207 | f.Heat = 0 | |
| 208 | f.Color = Color3.new(0.1,0.2,1) | |
| 209 | f.SecondaryColor = Color3.new(0.4,0.4,0.6) | |
| 210 | while hold do | |
| 211 | wait() | |
| 212 | main.CFrame = CFrame.new(holdpos,mouse.Hit.p) | |
| 213 | end | |
| 214 | mk = main | |
| 215 | end | |
| 216 | else | |
| 217 | if inn == true and out == false then | |
| 218 | out = true | |
| 219 | mode = true | |
| 220 | hold = true | |
| 221 | local holdpos = mouse.Hit.p + Vector3.new(0,4,0) | |
| 222 | local portal = Instance.new("Model",workspace)
| |
| 223 | portal.Name = "OutPortal" | |
| 224 | local main = Instance.new("Part")
| |
| 225 | prop(main, portal, false, 0.1, 0.1, 2.4, 2.4, 0.6, "Neon orange", true, "Custom") | |
| 226 | main.CFrame = CFrame.new(holdpos,mouse.Hit.p) * CFrame.new(0,3,0) | |
| 227 | local mes = Instance.new("SpecialMesh")
| |
| 228 | mesh(mes,main,7,7,4,"FileMesh") | |
| 229 | mes.MeshId = "http://www.roblox.com/asset/?id=3270017" | |
| 230 | local f = Instance.new("Fire",main)
| |
| 231 | f.Size = 7 | |
| 232 | f.Heat = 0 | |
| 233 | f.Color = Color3.new(1,0.2,0.1) | |
| 234 | f.SecondaryColor = Color3.new(0.8,0.1,0.08) | |
| 235 | km = main | |
| 236 | hold = true | |
| 237 | while hold do | |
| 238 | wait() | |
| 239 | main.CFrame = CFrame.new(holdpos,mouse.Hit.p) | |
| 240 | end | |
| 241 | local tuch = true | |
| 242 | mk.Touched:connect(function(hit) | |
| 243 | local pla = game.Players:findFirstChild(hit.Parent.Name) | |
| 244 | if pla then | |
| 245 | if tuch then | |
| 246 | tuch = false | |
| 247 | local ff = Instance.new("Part")
| |
| 248 | prop(ff,me.Character,false,1,0.2,2.3,2.3,1,"Medium blue",true,"Custom") | |
| 249 | local mag = (mk.Position - main.Position).magnitude | |
| 250 | ff.Size = Vector3.new(2.3,2.3,1) | |
| 251 | ff.CFrame = CFrame.new(mk.Position, main.Position) * CFrame.new(0,0,-mag/2) | |
| 252 | local mee = Instance.new("SpecialMesh",ff)
| |
| 253 | mee.MeshType = "Brick" | |
| 254 | mee.Scale = Vector3.new(0.65,0.65,mag) | |
| 255 | for i=0.1, 1.1, 0.05 do | |
| 256 | mk.Transparency = i | |
| 257 | ff.Transparency = ff.Transparency - 0.04 | |
| 258 | mee.Scale = Vector3.new(math.random(5,130)/100,math.random(5,130)/100,mag) | |
| 259 | wait() | |
| 260 | end | |
| 261 | pla.Character.Torso.CFrame = main.CFrame * CFrame.new(0,0,-3) | |
| 262 | for i=0.1,1.1,0.05 do | |
| 263 | main.Transparency = i | |
| 264 | ff.Transparency = ff.Transparency + 0.08 | |
| 265 | mee.Scale = Vector3.new(math.random(30,120)/100,math.random(30,120)/100,mag) | |
| 266 | wait() | |
| 267 | end | |
| 268 | ff:remove() | |
| 269 | main:remove() | |
| 270 | mk:remove() | |
| 271 | mk = nil | |
| 272 | inn = false | |
| 273 | out = false | |
| 274 | end | |
| 275 | end | |
| 276 | end) | |
| 277 | end | |
| 278 | end | |
| 279 | end) | |
| 280 | mouse.Button1Up:connect(function() | |
| 281 | hold = false | |
| 282 | end) | |
| 283 | mouse.KeyDown:connect(function(key) | |
| 284 | key = key:lower() | |
| 285 | if (key == "q") then | |
| 286 | mode = true | |
| 287 | if mk ~= nil then | |
| 288 | mk:remove() | |
| 289 | mk = nil | |
| 290 | inn = false | |
| 291 | end | |
| 292 | if km ~= nil then | |
| 293 | km:remove() | |
| 294 | km = nil | |
| 295 | out = false | |
| 296 | end | |
| 297 | end | |
| 298 | end) | |
| 299 | end | |
| 300 | ||
| 301 | bin.Selected:connect(sel) | |
| 302 | ||
| 303 | --mediafire |