Hello i need help, I want my script to make it say your username on the sign please do not change any of the variables, Thank you
game:GetService("Players").PlayerAdded:Connect(function(player)
local function getServerType()
if game.PrivateServerId ~= "" then
if game.PrivateServerOwnerId ~= 0 then
return "VIPServer"
else
return "ReservedServer"
end
else
return "StandardServer"
end
end
print(getServerType())
if getServerType() == 'VIPServer' then
print("Vip")
local vipName = game:GetService("Players"):GetNameFromUserIdAsync(game.VIPServerOwnerId)
workspace.p11.SurfaceGui.TextLabel.Text = vipName
game.Workspace.p11.CanCollide = true
-- start
local name22 = player.Name
workspace.p11.SurfaceGui.TextLabel5b.Text = name22
if vipName == "dyleddie" then
workspace.p11.SurfaceGui.TextLabel.Text = "dyleddie (đ„Staff)"
--workspace.p11.SurfaceGui.TextLabel5b.Text = "dyleddie (đ„Staff)"
end
if name22 == "dyleddie" then
workspace.p11.SurfaceGui.TextLabel5b.Text = "dyleddie (đ„Staff)"
end
end
-- end
if getServerType() == 'ReservedServer' then
local names = game.Players.Name
wait(2)
player:Kick("This Server is being updated, Please rejoin")
end
if getServerType() == 'StandardServer' then
game.Workspace.p11.SurfaceGui.Enabled = false
game.Workspace.p11.Transparency = 1
game.Workspace.p11.CanCollide = false
end
end)
Please help!! i need it really badly.
Thereâs a few issues with your script. I wrote a revised script which doesnât change anything at all, except replace the text on the TextLabel as the playerâs name, and also keeps the cool â(staff
)â too, if you want to explain it a bit more, that would be cool. Things like do you want the âdyleddieâ part removed, and the playerâs name there? Let me know! Cheers.
game:GetService("Players").PlayerAdded:Connect(function(player)
local function getServerType()
if game.PrivateServerId ~= "" then
if game.PrivateServerOwnerId ~= 0 then
return "VIPServer"
else
return "ReservedServer"
end
else
return "StandardServer"
end
end
print(getServerType())
if getServerType() == "VIPServer" then
print("Vip")
local vipName = game:GetService("Players"):GetNameFromUserIdAsync(game.PrivateServerOwnerId)
workspace.p11.SurfaceGui.TextLabel.Text = vipName
game.Workspace.p11.CanCollide = true
-- start
local name22 = player.Name
workspace.p11.SurfaceGui.TextLabel5b.Text = name22
if vipName == player.Name then
workspace.p11.SurfaceGui.TextLabel.Text = player.Name .. " (đ„Staff)"
--workspace.p11.SurfaceGui.TextLabel5b.Text = player.Name .. " (đ„Staff)"
end
if name22 == player.Name then
workspace.p11.SurfaceGui.TextLabel5b.Text = player.Name .. " (đ„Staff)"
end
end
-- end
if getServerType() == "ReservedServer" then
local names = game.Players.Name
wait(2)
player:Kick("This Server is being updated, Please rejoin")
end
if getServerType() == "StandardServer" then
game.Workspace.p11.SurfaceGui.Enabled = false
game.Workspace.p11.Transparency = 1
game.Workspace.p11.CanCollide = false
end
end)