Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- LocalScript
- game.Players.PlayerAdded:Connect(function(player)
- -- Wait for the player to load
- wait() -- Delay for a brief moment to ensure the player's team data is available
- local head = script.Parent.Parent.Head
- local tycoon1Team = game.Teams:FindFirstChild("Tycoon 1")
- local neutralTeam = game.Teams:FindFirstChild("Neutral")
- local near = game.Teams:FindFirstChild("Near Tycoon 1")
- player.Team = neutralTeam
- wait()
- while head.Transparency ~= 0.5 do
- wait() -- Wait for the Head's transparency to be 0.5
- end
- if player.Team == neutralTeam and workspace.Head.Transparency == 0.5 then
- wait()
- head.Transparency = 0
- head.PlayerOwner.Value = ""
- head.SurfaceGui.TextLabel.Text = "Touch to claim!"
- print("Player is trying to cheat without being in the near team.")
- -- Teleport the player to the spawn location
- local spawnLocation = game.Workspace.SpawnLocation -- Replace with the actual spawn location
- player.Character:SetPrimaryPartCFrame(spawnLocation.CFrame)
- if player.Team == near and workspace.Head.Transparency == 0.5 then
- print("Player is in the near team, so now they are in the tycoon 1 team.")
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment