Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function Dir(sString)
- local sArray = {}
- local Finished = nil
- for s in string.gmatch(sString,"[^.]+") do
- table.insert(sArray,s)
- end
- local function FFC(Obj,Pos)
- for _,i in pairs(GetChildren(Obj)) do
- if GetProperty(i,"Name") == sArray[Pos] then
- if Pos == #sArray then
- Finished = i
- else
- FFC(i,Pos+1)
- end
- end
- end
- end
- if sArray[1] == "game" then
- sArray[1] = game
- end
- if sArray[1] == "Workspace" then
- sArray[1] = Workspace
- end
- FFC(sArray[1],2)
- while true do
- wait(.01)
- if Finished ~= nil then
- return Finished
- end
- end
- end
- local Players = GetChildren(Dir("game.Players"))
- local LocalPlayer = Players[1]
- whitelist = "TheSecondPenguin","ShoopDaHewp"
- if GetProperty(LocalPlayer,"Name") == whitelist then
- print("yes")
- else
- print("no")
- end
Advertisement
Add Comment
Please, Sign In to add comment