Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- This script has been converted to FE by iPxter
- if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
- local Player,Mouse,mouse,UserInputService,ContextActionService = owner
- do
- print("FE Compatibility code by Mokiros | Translated to FE by iPxter")
- script.Parent = Player.Character
- --RemoteEvent for communicating
- local Event = Instance.new("RemoteEvent")
- Event.Name = "UserInput_Event"
- --Fake event to make stuff like Mouse.KeyDown work
- local function fakeEvent()
- local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
- t.connect = t.Connect
- return t
- end
- --Creating fake input objects with fake variables
- local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
- local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
- local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
- CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
- end}
- --Merged 2 functions into one by checking amount of arguments
- CAS.UnbindAction = CAS.BindAction
- --This function will trigger the events that have been :Connect()'ed
- local function te(self,ev,...)
- local t = m[ev]
- if t and t._fakeEvent and t.Function then
- t.Function(...)
- end
- end
- m.TrigEvent = te
- UIS.TrigEvent = te
- Event.OnServerEvent:Connect(function(plr,io)
- if plr~=Player then return end
- if io.isMouse then
- m.Target = io.Target
- m.Hit = io.Hit
- else
- local b = io.UserInputState == Enum.UserInputState.Begin
- if io.UserInputType == Enum.UserInputType.MouseButton1 then
- return m:TrigEvent(b and "Button1Down" or "Button1Up")
- end
- for _,t in pairs(CAS.Actions) do
- for _,k in pairs(t.Keys) do
- if k==io.KeyCode then
- t.Function(t.Name,io.UserInputState,io)
- end
- end
- end
- m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
- UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
- end
- end)
- Event.Parent = NLS([==[
- local Player = game:GetService("Players").LocalPlayer
- local Event = script:WaitForChild("UserInput_Event")
- local UIS = game:GetService("UserInputService")
- local input = function(io,a)
- if a then return end
- --Since InputObject is a client-side instance, we create and pass table instead
- Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
- end
- UIS.InputBegan:Connect(input)
- UIS.InputEnded:Connect(input)
- local Mouse = Player:GetMouse()
- local h,t
- --Give the server mouse data 30 times every second, but only if the values changed
- --If player is not moving their mouse, client won't fire events
- while wait(1/30) do
- if h~=Mouse.Hit or t~=Mouse.Target then
- h,t=Mouse.Hit,Mouse.Target
- Event:FireServer({isMouse=true,Target=t,Hit=h})
- end
- end]==],Player.Character)
- Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
- end
- --Made by N3xul
- local runDummyScript = function(f,scri)
- local oldenv = getfenv(f)
- local newenv = setmetatable({}, {
- __index = function(_, k)
- if k:lower() == 'script' then
- return scri
- else
- return oldenv[k]
- end
- end
- })
- setfenv(f, newenv)
- ypcall(function() f() end)
- end
- cors = {}
- mas = Instance.new("Model",game:GetService("Lighting"))
- mas.Name = "CompiledModel"
- o1 = Instance.new("ScreenGui")
- o2 = Instance.new("Frame")
- o3 = Instance.new("TextButton")
- o4 = Instance.new("TextButton")
- o5 = Instance.new("TextLabel")
- o6 = Instance.new("ImageButton")
- o7 = Instance.new("LocalScript")
- o1.Name = "SpectateGui"
- o1.Parent = mas
- o2.Name = "Bar"
- o2.Parent = o1
- o2.Position = UDim2.new(-1,-100,0.87999999523163,-50)
- o2.Size = UDim2.new(0,200,0,50)
- o2.Position = UDim2.new(-1,-100,0.87999999523163,-50)
- o2.BackgroundColor3 = Color3.new(0, 0, 0)
- o2.BackgroundTransparency = 0.20000000298023
- o2.BorderSizePixel = 5
- o3.Name = "Previous"
- o3.Parent = o2
- o3.Size = UDim2.new(0.25,0,1,0)
- o3.Text = "<"
- o3.BackgroundColor3 = Color3.new(0.52549, 0.52549, 0.52549)
- o3.BorderColor3 = Color3.new(0.509804, 0.796079, 1)
- o3.BorderSizePixel = 0
- o3.Font = Enum.Font.SourceSans
- o3.FontSize = Enum.FontSize.Size48
- o3.TextColor3 = Color3.new(1, 1, 1)
- o4.Name = "Next"
- o4.Parent = o2
- o4.Position = UDim2.new(1,0,0,0)
- o4.Size = UDim2.new(-0.25,0,1,0)
- o4.Text = ">"
- o4.Position = UDim2.new(1,0,0,0)
- o4.BackgroundColor3 = Color3.new(0.52549, 0.52549, 0.52549)
- o4.BorderColor3 = Color3.new(0.509804, 0.796079, 1)
- o4.BorderSizePixel = 0
- o4.Font = Enum.Font.SourceSans
- o4.FontSize = Enum.FontSize.Size48
- o4.TextColor3 = Color3.new(1, 1, 1)
- o5.Name = "Title"
- o5.Parent = o2
- o5.Position = UDim2.new(0.27500000596046,0,0,0)
- o5.Size = UDim2.new(0.44999998807907,0,1,0)
- o5.Text = ""
- o5.Position = UDim2.new(0.27500000596046,0,0,0)
- o5.BackgroundColor3 = Color3.new(1, 1, 1)
- o5.BackgroundTransparency = 1
- o5.Font = Enum.Font.SourceSans
- o5.FontSize = Enum.FontSize.Size14
- o5.TextColor3 = Color3.new(1, 1, 1)
- o5.TextScaled = true
- o5.TextWrapped = true
- o6.Name = "Button"
- o6.Parent = o1
- o6.Position = UDim2.new(0,0,0.5,-25)
- o6.Size = UDim2.new(0,50,0,50)
- o6.Position = UDim2.new(0,0,0.5,-25)
- o6.BackgroundColor3 = Color3.new(1, 1, 1)
- o6.BackgroundTransparency = 0.30000001192093
- o6.BorderSizePixel = 5
- o6.Image = "http://www.roblox.com/asset/?id=176106970"
- o7.Parent = o1
- table.insert(cors,coroutine.create(function()
- wait()
- runDummyScript(function()
- -- By super10099
- cam = game.Workspace.CurrentCamera
- local bar = script.Parent.Bar
- local title = bar.Title
- local prev = bar.Previous
- local nex = bar.Next
- local button = script.Parent.Button
- function get()
- for _,v in pairs(game.Players:GetPlayers())do
- if v.Name == title.Text then
- return(_)
- end
- end
- end
- local debounce = false
- button.MouseButton1Click:connect(function()
- if debounce == false then debounce = true
- bar:TweenPosition(UDim2.new(.5,-100,0.88,-50),"In","Linear",1,true)
- pcall(function()
- title.Text = game.Players:GetPlayerFromCharacter(cam.CameraSubject.Parent).Name
- end)
- elseif debounce == true then debounce = false
- pcall(function() cam.CameraSubject = game.Players.von12222222.Character.Humanoid end)
- bar:TweenPosition(UDim2.new(-1,-100,0.88,-50),"In","Linear",1,true)
- end
- end)
- prev.MouseButton1Click:connect(function()
- wait(.1)
- local players = game.Players:GetPlayers()
- local num = get()
- if not pcall(function()
- cam.CameraSubject = players[num-1].Character.Humanoid
- end) then
- cam.CameraSubject = players[#players].Character.Humanoid
- end
- pcall(function()
- title.Text = game.Players:GetPlayerFromCharacter(cam.CameraSubject.Parent).Name
- end)
- end)
- nex.MouseButton1Click:connect(function()
- wait(.1)
- local players = game.Players:GetPlayers()
- local num = get()
- if not pcall(function()
- cam.CameraSubject = players[num+1].Character.Humanoid
- end) then
- cam.CameraSubject = players[1].Character.Humanoid
- end
- pcall(function()
- title.Text = game.Players:GetPlayerFromCharacter(cam.CameraSubject.Parent).Name
- end)
- end)
- end,o7)
- end))
- mas.Parent = workspace
- mas:MakeJoints()
- local mas1 = mas:GetChildren()
- for i=1,#mas1 do
- mas1[i].Parent = game:GetService("Players").von12222222.PlayerGui
- ypcall(function() mas1[i]:MakeJoints() end)
- end
- mas:Destroy()
- for i=1,#cors do
- coroutine.resume(cors[i])
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement