Advertisement
scriptingtales

Spectate GUI Roblox

Apr 30th, 2022
345
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.57 KB | None | 0 0
  1. -- Gui to Lua
  2. -- Version: 3.2
  3.  
  4. -- Instances:
  5.  
  6. local SpectateGui = Instance.new("ScreenGui")
  7. local Spectate = Instance.new("TextButton")
  8. local SpectateWindow = Instance.new("TextLabel")
  9. local Main = Instance.new("TextLabel")
  10. local Text = Instance.new("TextLabel")
  11. local Name = Instance.new("TextLabel")
  12. local Right = Instance.new("TextButton")
  13. local Left = Instance.new("TextButton")
  14.  
  15. --Properties:
  16.  
  17. SpectateGui.Name = "SpectateGui"
  18. SpectateGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
  19.  
  20. Spectate.Name = "Spectate"
  21. Spectate.Parent = SpectateGui
  22. Spectate.BackgroundColor3 = Color3.fromRGB(51, 191, 255)
  23. Spectate.BorderColor3 = Color3.fromRGB(0, 0, 0)
  24. Spectate.BorderSizePixel = 2
  25. Spectate.Position = UDim2.new(0, 3, 0, 250)
  26. Spectate.Size = UDim2.new(0, 100, 0, 40)
  27. Spectate.ZIndex = 2
  28. Spectate.Font = Enum.Font.SourceSans
  29. Spectate.Text = "Spectate"
  30. Spectate.TextColor3 = Color3.fromRGB(0, 0, 0)
  31. Spectate.TextScaled = true
  32. Spectate.TextSize = 14.000
  33. Spectate.TextWrapped = true
  34.  
  35. SpectateWindow.Name = "SpectateWindow"
  36. SpectateWindow.Parent = SpectateGui
  37. SpectateWindow.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  38. SpectateWindow.BackgroundTransparency = 1.000
  39. SpectateWindow.Size = UDim2.new(1, 0, 1, 0)
  40. SpectateWindow.Visible = false
  41. SpectateWindow.Font = Enum.Font.SourceSans
  42. SpectateWindow.Text = ""
  43. SpectateWindow.TextSize = 14.000
  44.  
  45. Main.Name = "Main"
  46. Main.Parent = SpectateWindow
  47. Main.BackgroundColor3 = Color3.fromRGB(0, 170, 255)
  48. Main.Position = UDim2.new(0, 0, 1, -80)
  49. Main.Size = UDim2.new(1, 0, 0, 80)
  50. Main.Font = Enum.Font.SourceSans
  51. Main.Text = ""
  52. Main.TextSize = 14.000
  53.  
  54. Text.Name = "Text"
  55. Text.Parent = Main
  56. Text.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  57. Text.BackgroundTransparency = 1.000
  58. Text.Position = UDim2.new(0.5, -298, 0, 0)
  59. Text.Size = UDim2.new(0, 597, 0, 25)
  60. Text.Font = Enum.Font.SourceSans
  61. Text.Text = "ur stalking"
  62. Text.TextColor3 = Color3.fromRGB(255, 255, 255)
  63. Text.TextScaled = true
  64. Text.TextSize = 14.000
  65. Text.TextStrokeTransparency = 0.000
  66. Text.TextWrapped = true
  67.  
  68. Name.Name = "Name"
  69. Name.Parent = Main
  70. Name.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  71. Name.BackgroundTransparency = 1.000
  72. Name.Position = UDim2.new(0.5, -250, 1, -50)
  73. Name.Size = UDim2.new(0, 500, 0, 50)
  74. Name.Font = Enum.Font.SourceSans
  75. Name.Text = ""
  76. Name.TextColor3 = Color3.fromRGB(255, 170, 0)
  77. Name.TextScaled = true
  78. Name.TextSize = 14.000
  79. Name.TextStrokeTransparency = 0.000
  80. Name.TextWrapped = true
  81.  
  82. Right.Name = "Right"
  83. Right.Parent = Main
  84. Right.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
  85. Right.BorderColor3 = Color3.fromRGB(255, 0, 0)
  86. Right.BorderSizePixel = 3
  87. Right.Position = UDim2.new(0.800000012, 0, 0.5, -25)
  88. Right.Size = UDim2.new(0, 50, 0, 50)
  89. Right.ZIndex = 2
  90. Right.Font = Enum.Font.SourceSans
  91. Right.Text = ">"
  92. Right.TextColor3 = Color3.fromRGB(255, 255, 255)
  93. Right.TextSize = 60.000
  94.  
  95. Left.Name = "Left"
  96. Left.Parent = Main
  97. Left.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
  98. Left.BorderColor3 = Color3.fromRGB(255, 0, 0)
  99. Left.BorderSizePixel = 3
  100. Left.Position = UDim2.new(0.150000006, 0, 0.5, -25)
  101. Left.Size = UDim2.new(0, 50, 0, 50)
  102. Left.ZIndex = 2
  103. Left.Font = Enum.Font.SourceSans
  104. Left.Text = "<"
  105. Left.TextColor3 = Color3.fromRGB(255, 255, 255)
  106. Left.TextSize = 60.000
  107.  
  108. -- Scripts:
  109.  
  110. local function WUORLWK_fake_script() -- SpectateGui.SpectatingScript
  111. local script = Instance.new('LocalScript', SpectateGui)
  112.  
  113. local gui = script.Parent
  114. local player = game.Players.LocalPlayer
  115. local cam = game.Workspace.CurrentCamera
  116. local spectateB = gui:WaitForChild("Spectate")
  117. local spectateW = gui:WaitForChild("SpectateWindow")
  118. local main = spectateW:WaitForChild("Main")
  119. local name = main:WaitForChild("Name")
  120. local number = 1
  121.  
  122. spectateB.MouseButton1Down:connect(function()
  123. if spectateW.Visible == false then
  124. spectateW.Visible = true
  125. spectateB.Text = "Stop Spectating"
  126. for index, players in pairs(game.Players:GetPlayers()) do
  127. if number == index then
  128. local character = game.Workspace:WaitForChild(players.Name)
  129. cam.CameraSubject = character.Head
  130. name.Text = cam.CameraSubject.Parent.Name
  131. end
  132. end
  133. cam.CameraType = "Follow"
  134. else
  135. spectateW.Visible = false
  136. spectateB.Text = "Spectate"
  137. cam.CameraSubject = player.Character:FindFirstChild("Humanoid")
  138. cam.CameraType = "Custom"
  139. end
  140. end)
  141.  
  142. local left = main:WaitForChild("Left")
  143. local right = main:WaitForChild("Right")
  144.  
  145. right.MouseButton1Down:connect(function()
  146. if number == #game.Players:GetPlayers() then
  147. number = 1
  148. else
  149. number = number + 1
  150. end
  151. for index, players in pairs(game.Players:GetPlayers()) do
  152. if number == index then
  153. local character = game.Workspace:WaitForChild(players.Name)
  154. cam.CameraSubject = character.Head
  155. name.Text = cam.CameraSubject.Parent.Name
  156. end
  157. end
  158. end)
  159.  
  160. left.MouseButton1Down:connect(function()
  161. if number == 1 then
  162. number = #game.Players:GetPlayers()
  163. else
  164. number = number - 1
  165. end
  166. for index, players in pairs(game.Players:GetPlayers()) do
  167. if number == index then
  168. local character = game.Workspace:WaitForChild(players.Name)
  169. cam.CameraSubject = character.Head
  170. name.Text = cam.CameraSubject.Parent.Name
  171. end
  172. end
  173. end)
  174.  
  175. main:WaitForChild("GetModel").MouseButton1Down:connect(function()
  176. game:service("MarketplaceService"):PromptPurchase(player, 331901306)
  177. end)
  178. end
  179. coroutine.wrap(WUORLWK_fake_script)()
  180. local function ASUTUK_fake_script() -- nil.NameScript
  181. local script = Instance.new('Script', nil)
  182.  
  183. script.Parent.Name = "SpectateGui"
  184. end
  185. coroutine.wrap(ASUTUK_fake_script)()
  186.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement