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
- --Ok Guys, I Changed My Mind, I Will Keep It Up Forever
- --You don't need to put your name in anywhere, just run this local script
- --[[Helicopter - Made 100% by Ethancomputermad - Prototype
- THIS IS A LOCALSCRIPT
- COMMANDS:
- SAY EJECT TO EJECT YOUR PASSENGER
- SAY LEAVE TO GET OUT
- TO GET IN OR LET A PASSENGER IN APPROACH THE MIDDLE OF THE HELICOPTER
- ]]
- wait(1)
- speed = 1
- turnspeed = math.pi / 90
- vspeed = 1
- isinheli = true
- function loadheli()
- p = Instance.new("Part", game.Workspace)
- p.Name = game.Players.LocalPlayer.Name .. "Heli"
- p.Anchored = true
- p.CFrame = CFrame.new(game.Players.LocalPlayer.Character.Torso.CFrame.X, game.Players.LocalPlayer.Character.Torso.CFrame.Y, game.Players.LocalPlayer.Character.Torso.CFrame.Z) + Vector3.new(0, 30, 0)
- p.Size = Vector3.new(6, 2.4, 5)
- m = Instance.new("SpecialMesh", p)
- m.MeshType = Enum.MeshType.FileMesh
- m.MeshId = "http://www.roblox.com/asset/?id=70264208"
- m.Scale = Vector3.new(5, 5, 5)
- m.TextureId = "http://www.roblox.com/asset/?id=70264191"
- return p
- end
- pl = game.Players.LocalPlayer
- cam = game.Workspace.CurrentCamera
- mouse = pl:GetMouse()
- pcall(function() game.Workspace[pl.Name .. "Heli"]:Destroy() end)
- loadheli()
- heli = game.Workspace[pl.Name .. "Heli"]
- mf = false
- mb = false
- tl = false
- tr = false
- gu = false
- gd = false
- movement = coroutine.create(function(h) while true do wait() if isinheli == true then if mf == true then h.CFrame = h.CFrame * CFrame.new(0, 0, 0 - speed) end
- if mb == true then h.CFrame = h.CFrame * CFrame.new(0, 0, speed) end
- if tl == true then h.CFrame = h.CFrame * CFrame.Angles(0, turnspeed, 0) end
- if tr == true then h.CFrame = h.CFrame * CFrame.Angles(0, 0 - turnspeed, 0) end
- if gu == true then h.CFrame = h.CFrame + Vector3.new(0, vspeed, 0) end
- if gd == true then h.CFrame = h.CFrame + Vector3.new(0, 0 - vspeed, 0) end
- end
- end
- end)
- coroutine.resume(movement, heli)
- h = Instance.new("Hint", game.Workspace)
- h.Text = ""
- candosmoke = false
- spos = nil
- spos3 = nil
- pcall(function() spos = game.Workspace.Base.CFrame spos3 = game.Workspace.Base.Position base = game.Workspace.Base candosmoke = true end)
- if spos == nil then pcall(function() spos = game.Workspace["CLWorldFile - Really dont remove"].Base.CFrame spos3 = game.Workspace["CLWorldFile - Really dont remove"].Base.Position base = game.Workspace["CLWorldFile - Really dont remove"].Base candosmoke = true end) end
- if candosmoke == false then else
- smoke = coroutine.create(function(h, b)
- for i= 1, 8 do p = Instance.new("Part", h) p.Anchored = true p.CanCollide = false p.Transparency = 1 p.Name = i .. "s" s = Instance.new("Smoke", p) s.Enabled = false s.RiseVelocity = 5 s.Opacity = 0.3 s.Color = Color3.new(153 / 255, 102 / 255, 51 / 255) s.Name = "S" end
- while true do wait() for i= 1, 8 do h[i .. "s"].CFrame = CFrame.new(Vector3.new(h.Position.x, b.Position.y, h.Position.z)) * CFrame.Angles(math.pi / 2, 0, math.pi / 4 * (i - 1)) end
- if h.Position.y < spos3.y + 15 then
- for i= 1, 8 do wait() h[i .. "s"]:GetChildren()[1].Enabled = true end else
- for i= 1, 8 do wait() h[i .. "s"]:GetChildren()[1].Enabled = false end end
- end end)
- coroutine.resume(smoke, heli, base)
- end
- mchar = coroutine.create(function(c)
- while true do wait() if isinheli == true then pcall(function()
- c.Torso.Anchored = true
- c.Torso.CFrame = heli.CFrame * CFrame.new(0, -1.8, -8)
- end) end end end)
- coroutine.resume(mchar, pl.Character)
- dawooh = coroutine.create(function()
- while true do wait() if isinheli == true then else
- mf = false
- mb = false
- tl = false
- tr = false
- gu = false
- gd = false
- ucs = false end end end)
- coroutine.resume(dawooh)
- cam.CameraSubject = heli
- cam.CameraType = Enum.CameraType.Track
- cam.FieldOfView = 80
- mouse.KeyDown:connect(function(key)
- k = string.byte(key)
- if k == 17 then --[[Up arrow]]
- mf = true
- end
- if k == 18 then --[[Down arrow]]
- mb = true
- end
- if k == 20 then --[[Left arrow]]
- tl = true
- end
- if k == 19 then --[[Right arrow]]
- tr = true
- end
- if key == "w" then
- gu = true
- end
- if key == "s" then
- gd = true
- end
- end)
- mouse.KeyUp:connect(function(key)
- k = string.byte(key)
- if k == 17 then --[[Up arrow]]
- mf = false
- end
- if k == 18 then --[[Down arrow]]
- mb = false
- end
- if k == 20 then --[[Left arrow]]
- tl = false
- end
- if k == 19 then --[[Right arrow]]
- tr = false
- end
- if key == "w" then
- gu = false
- end
- if key == "s" then
- gd = false
- end
- end)
- occupied = false
- ucs = false
- heli.Touched:connect(function(c)
- if c.Parent.Name == pl.Name then
- isinheli = true
- else
- if occupied == false then else return end
- if c.Parent:FindFirstChild("Humanoid") ~= nil then else return end
- occupied = true
- ucs = true
- while ucs == true do wait()
- pcall(function() c.Parent.Torso.Anchored = true c.Parent.Torso.CFrame = heli.CFrame end) end
- pcall(function()
- c.Parent.Torso.CFrame = c.Parent.Torso.CFrame * CFrame.Angles(0, math.pi / 2, 0)
- c.Parent.Torso.CFrame = c.Parent.Torso.CFrame * CFrame.new(0, 0, 0 - 7)
- c.Parent.Torso.Anchored = false
- occupied = false
- end)
- end
- end)
- pl.Chatted:connect(function(msg)
- lmsg = string.lower(msg)
- if lmsg == "eject" then ucs = false end
- if lmsg == "leave" then isinheli = false pl.Character.Torso.CFrame = pl.Character.Torso.CFrame * CFrame.Angles(0, math.pi / 2, 0) pl.Character.Torso.CFrame = pl.Character.Torso.CFrame * CFrame.new(0, 0, 0 - 5) pl.Character.Torso.Anchored = false
- cam.CameraSubject = pl.Character.Head
- cam.CameraType = Enum.CameraType.Track end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement