Advertisement
xDavid673x

sep

Aug 7th, 2022
967
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 6.92 KB | None | 0 0
  1. --Made by N3xul
  2. local runDummyScript = function(f, scri)
  3.     local oldenv = getfenv(f)
  4.     local newenv =
  5.         setmetatable(
  6.         {},
  7.         {
  8.             __index = function(_, k)
  9.                 if k:lower() == "script" then
  10.                     return scri
  11.                 else
  12.                     return oldenv[k]
  13.                 end
  14.             end
  15.         }
  16.     )
  17.     setfenv(f, newenv)
  18.     ypcall(
  19.         function()
  20.             f()
  21.         end
  22.     )
  23. end
  24. cors = {}
  25. mas = Instance.new("Model", game:GetService("Lighting"))
  26. mas.Name = "CompiledModel"
  27. o1 = Instance.new("ScreenGui")
  28. o2 = Instance.new("Frame")
  29. o3 = Instance.new("TextButton")
  30. o4 = Instance.new("TextButton")
  31. o5 = Instance.new("TextLabel")
  32. o6 = Instance.new("ImageButton")
  33. o7 = Instance.new("LocalScript")
  34. o1.Name = "SpectateGui"
  35. o1.Parent = mas
  36. o2.Name = "Bar"
  37. o2.Parent = o1
  38. o2.Position = UDim2.new(-1, -100, 0.87999999523163, -50)
  39. o2.Size = UDim2.new(0, 200, 0, 50)
  40. o2.Position = UDim2.new(-1, -100, 0.87999999523163, -50)
  41. o2.BackgroundColor3 = Color3.new(0, 0, 0)
  42. o2.BackgroundTransparency = 0.20000000298023
  43. o2.BorderSizePixel = 5
  44. o3.Name = "Previous"
  45. o3.Parent = o2
  46. o3.Size = UDim2.new(0.25, 0, 1, 0)
  47. o3.Text = "<"
  48. o3.BackgroundColor3 = Color3.new(0.52549, 0.52549, 0.52549)
  49. o3.BorderColor3 = Color3.new(0.509804, 0.796079, 1)
  50. o3.BorderSizePixel = 0
  51. o3.Font = Enum.Font.SourceSans
  52. o3.FontSize = Enum.FontSize.Size48
  53. o3.TextColor3 = Color3.new(1, 1, 1)
  54. o4.Name = "Next"
  55. o4.Parent = o2
  56. o4.Position = UDim2.new(1, 0, 0, 0)
  57. o4.Size = UDim2.new(-0.25, 0, 1, 0)
  58. o4.Text = ">"
  59. o4.Position = UDim2.new(1, 0, 0, 0)
  60. o4.BackgroundColor3 = Color3.new(0.52549, 0.52549, 0.52549)
  61. o4.BorderColor3 = Color3.new(0.509804, 0.796079, 1)
  62. o4.BorderSizePixel = 0
  63. o4.Font = Enum.Font.SourceSans
  64. o4.FontSize = Enum.FontSize.Size48
  65. o4.TextColor3 = Color3.new(1, 1, 1)
  66. o5.Name = "Title"
  67. o5.Parent = o2
  68. o5.Position = UDim2.new(0.27500000596046, 0, 0, 0)
  69. o5.Size = UDim2.new(0.44999998807907, 0, 1, 0)
  70. o5.Text = ""
  71. o5.Position = UDim2.new(0.27500000596046, 0, 0, 0)
  72. o5.BackgroundColor3 = Color3.new(1, 1, 1)
  73. o5.BackgroundTransparency = 1
  74. o5.Font = Enum.Font.SourceSans
  75. o5.FontSize = Enum.FontSize.Size14
  76. o5.TextColor3 = Color3.new(1, 1, 1)
  77. o5.TextScaled = true
  78. o5.TextWrapped = true
  79. o6.Name = "Button"
  80. o6.Parent = o1
  81. o6.Position = UDim2.new(0, 0, 0.5, -25)
  82. o6.Size = UDim2.new(0, 50, 0, 50)
  83. o6.Position = UDim2.new(0, 0, 0.5, -25)
  84. o6.BackgroundColor3 = Color3.new(1, 1, 1)
  85. o6.BackgroundTransparency = 0.30000001192093
  86. o6.BorderSizePixel = 5
  87. o6.Image = "http://www.roblox.com/asset/?id=176106970"
  88. o7.Parent = o1
  89. table.insert(
  90.     cors,
  91.     coroutine.create(
  92.         function()
  93.             wait()
  94.             runDummyScript(
  95.                 function()
  96.                     -- By super10099
  97.  
  98.                     cam = game.Workspace.CurrentCamera
  99.  
  100.                     local bar = script.Parent.Bar
  101.                     local title = bar.Title
  102.                     local prev = bar.Previous
  103.                     local nex = bar.Next
  104.                     local button = script.Parent.Button
  105.  
  106.                     function get()
  107.                         for _, v in pairs(game.Players:GetPlayers()) do
  108.                             if v.Name == title.Text then
  109.                                 return (_)
  110.                             end
  111.                         end
  112.                     end
  113.  
  114.                     local debounce = false
  115.                     button.MouseButton1Click:connect(
  116.                         function()
  117.                             if debounce == false then
  118.                                 debounce = true
  119.                                 bar:TweenPosition(UDim2.new(.5, -100, 0.88, -50), "In", "Linear", 1, true)
  120.                                 pcall(
  121.                                     function()
  122.                                         title.Text = game.Players:GetPlayerFromCharacter(cam.CameraSubject.Parent).Name
  123.                                     end
  124.                                 )
  125.                             elseif debounce == true then
  126.                                 debounce = false
  127.                                 pcall(
  128.                                     function()
  129.                                         cam.CameraSubject = game.Players.LocalPlayer.Character.Humanoid
  130.                                     end
  131.                                 )
  132.                                 bar:TweenPosition(UDim2.new(-1, -100, 0.88, -50), "In", "Linear", 1, true)
  133.                             end
  134.                         end
  135.                     )
  136.  
  137.                     prev.MouseButton1Click:connect(
  138.                         function()
  139.                             wait(.1)
  140.                             local players = game.Players:GetPlayers()
  141.                             local num = get()
  142.                             if
  143.                                 not pcall(
  144.                                     function()
  145.                                         cam.CameraSubject = players[num - 1].Character.Humanoid
  146.                                     end
  147.                                 )
  148.                              then
  149.                                 cam.CameraSubject = players[#players].Character.Humanoid
  150.                             end
  151.                             pcall(
  152.                                 function()
  153.                                     title.Text = game.Players:GetPlayerFromCharacter(cam.CameraSubject.Parent).Name
  154.                                 end
  155.                             )
  156.                         end
  157.                     )
  158.  
  159.                     nex.MouseButton1Click:connect(
  160.                         function()
  161.                             wait(.1)
  162.                             local players = game.Players:GetPlayers()
  163.                             local num = get()
  164.                             if
  165.                                 not pcall(
  166.                                     function()
  167.                                         cam.CameraSubject = players[num + 1].Character.Humanoid
  168.                                     end
  169.                                 )
  170.                              then
  171.                                 cam.CameraSubject = players[1].Character.Humanoid
  172.                             end
  173.                             pcall(
  174.                                 function()
  175.                                     title.Text = game.Players:GetPlayerFromCharacter(cam.CameraSubject.Parent).Name
  176.                                 end
  177.                             )
  178.                         end
  179.                     )
  180.                 end,
  181.                 o7
  182.             )
  183.         end
  184.     )
  185. )
  186. mas.Parent = workspace
  187. mas:MakeJoints()
  188. local mas1 = mas:GetChildren()
  189. for i = 1, #mas1 do
  190.     mas1[i].Parent = game:GetService("Players").LocalPlayer.PlayerGui
  191.     ypcall(
  192.         function()
  193.             mas1[i]:MakeJoints()
  194.         end
  195.     )
  196. end
  197. mas:Destroy()
  198. for i = 1, #cors do
  199.     coroutine.resume(cors[i])
  200. end
  201.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement