There is 7 players max in my game. there are 8 spaces in my Player List. The first space is for the team that only holds one person, a red space. The one person team is the "killer". all other spaces start out white. when the round starts, the white spaces turn black (except for one, because there won't be a player there) When the "ninja" is being "killed", the black slowly fades into white. When the "ninja" dies it will be completely white. The ninja can escape, and it will not regenerate, keeping the shade of grey on the player list that "covers their name". Modify these scripts: this is the one that makes the players go on the player list. each text is called PlayerLabel1, and so on. after PlayerLabel9 it becomes PlayerLabelA1, e.t.c.. (so far the first player to join will always be red):
function update()
c = script.Parent:GetChildren()
for i = 1,#c do
if string.sub(c[i].Name, 1, 11) == "PlayerLabel" then
c[i].Visible = false
end
end
for i = 1,#plr do
item = script.Parent:findFirstChild("PlayerLabel" .. tostring(i))
if (item~=nil) then
item.Visible = true
item.Text = plr[i].Name
end
end
end
function getNumber(obj)
for i = 1,#plr do
if plr[i]==obj then
return i
end
end
end
plr = {}
p = game.Players:GetChildren()
for i = 1,#p do
table.insert(plr, p[i])
end
update()
game.Players.ChildAdded:connect(function (guy) table.insert(plr, guy) update() end)
game.Players.ChildRemoved:connect(function (guy) table.remove(plr, getNumber(guy)) update()
this is (probably) an unimportant one but it resizes the list to fit screens:
local tray = script.Parent
function makeYRelative()
tray.SizeConstraint = 2
end
function makeXRelative()
tray.SizeConstraint = 1
end
if screen.AbsoluteSize.x > screen.AbsoluteSize.y then
makeYRelative()
else
makeXRelative()
end
function recenter()
tray.Position = UDim2.new(0,screen.AbsoluteSize.X/2 - tray.AbsoluteSize.X/2,tray.Position.Y.Scale,tray.Position.Y.Offset)
end
recenter()
screen.Changed:connect(function(property)
if property == "AbsoluteSize" then
if screen.AbsoluteSize.x > screen.AbsoluteSize.y then
makeYRelative()
else
makeXRelative()
end
recenter()
end
end)
