Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I make it so this Rank GUI appears and will show on everyone? [closed]

Asked by 6 years ago
local epicPeople = {""}
--Hoseokjeong

local swagOn = true

function findEpicPeople(person)
    for i,v in pairs(epicPeople) do
        if v == person then
            return true
        end
    end
    return false
end

function assesIfCan(plr)
    if findEpicPeople(plr.Name) == true or plr:GetRankInGroups(4186798, 3728461) >= 0-255
     then
        return true
    end
    return false
end 

local ids = {1,1}
local teams = {"Team1"}
local terrorists = {} 

function checkTeam(player1)
    local team = nil
    local tc = nil
    for o,b in pairs(game.Teams:GetChildren()) do
        if b.TeamColor == player1.TeamColor then
            tc = b.Name
        end
    end
    for i,v in pairs(teams) do
        if v == tc then
            team = i
        end
    end
    local group = ids[team]
    return group
end

local player = game.Players.LocalPlayer
function assessRank()
    if game.Players.LocalPlayer:IsInGroup(4186798) or not game:FindFirstChild("NetworkServer") then
        repeat wait() until game.Workspace:FindFirstChild(player.Name)
        repeat wait() until player.Character:FindFirstChild("Head")
        if player.Character:FindFirstChild("Rank") then
            player.Character.Rank:remove()
        end
        a = script.Rank:clone()
        a.Parent = player.Character
        a.Adornee = player.Character.Head
        a.Frame.TextLabel.Text = player:GetRoleInGroup(4186798)
        local groups = {4186863, 4299061, 4166199, 3828960, 4010414, 3728461, 3658297, 3372423, 3064151}
        for i=1, #groups do
            local role = player:GetRoleInGroup(groups[i])
            if role ~= "Guest" then
                a.Frame.Regiment.Text = role
            end
        end
        a.Frame.Name1.Text = player.Name
        a.Frame.Name1.TextColor = player.TeamColor
        a.Frame.Regiment.TextColor = player.TeamColor
            a.Frame.Name1.TextStrokeTransparency = 0
        end
        if checkTeam(player) then
        a.Frame.TextLabel.Text = player:GetRoleInGroup(checkTeam(player))
        a.Frame.Regiment.Text = player:GetRoleInGroup(checkTeam(player))
        end

        repeat wait() until player.Character:FindFirstChild("Humanoid")
        player.Character.Humanoid.NameOcclusion = "OccludeAll"
        if player.Character:FindFirstChild("Body Colors") then
        if player.TeamColor == BrickColor.new("Medium stone grey") or player.TeamColor == BrickColor.new("White") then
            player.Character["Body Colors"]:remove()

        end
    end
end

assessRank()

game.Players.LocalPlayer.Changed:connect(function (prop)
    if prop == "TeamColor" then
        assessRank()
    end
end)
0
This ain't your script! User#19524 175 — 6y

Closed as Not Constructive by User#19524

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?