local chatGUI = script.Parent.Parent:WaitForChild("ChatGUI")
game.ReplicatedFirst:RemoveDefaultLoadingScreen()
game:GetService("StarterGui"):SetCoreGuiEnabled(Enum.CoreGuiType.All, false)
local assetgui = script.Parent:WaitForChild("Loading_Assets")
-- [[ ]] --
chatGUI.Enabled = false
local success = false
local event = game.ReplicatedStorage:WaitForChild("MenuTools")
local scpfevents = game.ReplicatedStorage:WaitForChild("Events")
assetgui.Enabled = true
while not success do
local success, errormsg = pcall(function()
game:GetService("StarterGui"):SetCore("ResetButtonCallback", false)
--game:GetService("StarterGui"):SetCore("TopbarEnabled", false)
end)
if success then
print("DONE")
break
else
print("SLOW - " .. errormsg)
end
wait()
end
--chatGUI.Enabled = false
local player = game.Players.LocalPlayer
local teamselection = script.Parent:WaitForChild("Team-Selection")
local cutscenescript = teamselection:WaitForChild("SCPF_CUTSCENE")
local readyvalue = teamselection:WaitForChild("Ready")
local mainframe = assetgui:WaitForChild("Loading Assets Frame")
local pop_up = teamselection:WaitForChild("PopUp")
local suitsettings = { -- Table goes as follows: Name, ShirtID, PantsID
["O5 Council"] = {{"O5 Default", 338740550, 338750779}};
["[REDACTED]"] = {{"Suit", 338740550, 338750779}};
["Site Director"] = {{"SiD Suit", 338740550, 338750779}};
["O5-X"] = {{"O5-X Suit", 888180698, 888180169}};
["Administrator"] = {{"Administrator Suit", 338740550, 338750779}};
["Class D"] = {{"Class D Suit", 278872200, 278872148}};
["Class E"] = {{"Class E Suit", 567501638, 567501404}};
["Foundation Personnel"] = {{"Foundation Personnel", 958267478, 958267659}};
}
local hatstorage = game.ReplicatedStorage:WaitForChild("HatStorage")
local hairsettings = {
{"[M] Beautiful Black", hatstorage:WaitForChild("MALE-Black")};
{"[M] Beautiful Blonde", hatstorage:WaitForChild("MALE-Blonde")};
{"[M] Beautiful Brown", hatstorage:WaitForChild("MALE-Brown")};
{"[M] Charmer", hatstorage:WaitForChild("MALE-Charmer")};
{"[M] Blonde Charmer", hatstorage:WaitForChild("MALE-CharmerBlonde")};
{"[M] Blue Charmer", hatstorage:WaitForChild("MALE-CharmerBlue")};
{"[F] Long Black", hatstorage:WaitForChild("FEMALE-Black")};
{"[F] Long Blonde", hatstorage:WaitForChild("FEMALE-Blonde")};
{"[F] Long Brown", hatstorage:WaitForChild("FEMALE-Brown")};
{"[F] Anime Hair", hatstorage:WaitForChild("FEMALE-Anime")};
}
local facesettings = {
{"Skeptic", 150545226};
{"Shiny", 708214657};
{"Whistle", 228054851};
{"Suspicious", 210559531};
{"Bored", 136512852};
{"Err", 155195214};
{"Ankward Grin", 150374839}
}
local skinsettings = {
{"Pale", BrickColor.new("Pastel brown")};
{"Light-Tinted", BrickColor.new("Light orange")};
{"Tinted" , BrickColor.new("Nougat")};
{"Brown", BrickColor.new("Brown")}
}
--local suitsettings, hairsettings, facesettings, skinsettings = require(script.Parent.CharacterCustomization)
--local moduleAPI = require(script.Parent:WaitForChild("Module3D"))
-- [[ TEAM SETTINGS ]] --
local team_settings = { -- [[ FORMAT: USERID ]] --
["Class E"] = {447221885};
["O5-1"] = {123675221};
["O5-2"] = {177122625};
["O5-3"] = {47660361}; -- 47660361 - Wolfiyon |
["O5-4"] = {106096208}; -- 106096208
["O5-5"] = {0}; -- 285309339
["O5-6"] = {31368462};
["O5-7"] = {3805018};
["O5-8"] = {60221060}; -- 60221060
["O5-9"] = {126423302};
["O5-10"] = {126900660};
["O5-11"] = {83038669};
["O5-12"] = {84732423};
["O5-13"] = {434036932};
["O5-X"] = {285309339}; -- 285309339 - Job
["Site Director"] = {21990767, 687196616};
["Administrator"] = {720548616};
["SpecialPeople"] = {75540511};
}
local music_settings = { -- [[ FORMAT: MUSICID ]] --
{"iiSxnic", 916438756, 1571842475};
}
local O5_teamlist = { -- [[ FORMAT: TEAMNAME
["O5-1"] = {"Mobile Task Force"};
["O5-2"] = {"Internal Security Department"};
["O5-3"] = {"Department Of External Affairs"};
["O5-4"] = {"Engineering & Technical"};
["O5-5"] = {"Scientific Department"};
["O5-6"] = {"Ethics Committee"};
["O5-7"] = {"Security Department"};
["O5-8"] = {"Manufacturing Department"};
["O5-9"] = {"Medical Department"};
["O5-10"] = {"Intelligence Agency"};
["O5-11"] = {"Rapid Response Team"};
["O5-12"] = {"[DATA EXPUNGED]"};
["O5-13"] = {"O5C"};
["O5-X"] = {"Administrative Department"}; -- TEMP.
["Site Director"] = {"Manufacturing Department"};
["Administrator"] = {"The Administrator"};
["SpecialPeople"] = {"[REDACTED]"};
}
-- [[ ]]
local contentprovider = game:GetService("ContentProvider")
local server_event = game.ReplicatedStorage:WaitForChild("GUIFunctions")
local canClick = false
local selectedTeam = nil
local hoversound = teamselection:WaitForChild("MouseHover")
local clicksound = teamselection:WaitForChild("Click")
local noaccess = teamselection:WaitForChild("NoAccess")
local swooshsound = teamselection:WaitForChild("Swoosh")
-- [[ Handling functions ]] --
function FadeText(obj)
coroutine.resume(coroutine.create(function()
for i = obj.TextTransparency, 1.05, 0.01 do
obj.TextTransparency = i
wait()
end
end))
end
local logoRot = true
coroutine.resume(coroutine.create(function()
--[[
local logo = mainframe:FindFirstChild("S.C.P.F. Logo")
if logo then
local full_time = 1
while logoRot == true do
logo.Rotation = logo.Rotation + 4
if logo.Rotaion >= (360 * full_time) then
full_time = full_time + 1
end
wait()
end
while true do
logo.Rotation = logo.Rotation + 2
if logo.Rotation >= (359 * full_time) then
break
end
wait()
end
logo.Rotation = 360 * full_time
end
]]--
end))
function HandleIntro()
logoRot = true
-- [[]] --
local logo = mainframe:FindFirstChild("S.C.P.F. Logo")
local totalassets = tonumber(contentprovider.RequestQueueSize)
local storednumber = totalassets
--[[]]--
local percentagetext = mainframe:WaitForChild("Percentage")
local assettext = mainframe:WaitForChild("AssetText")
local assetdesc = mainframe:WaitForChild("assets-desc.")
local credit = mainframe:WaitForChild("Credit")
local op1 = mainframe:WaitForChild("S.C.P.F. Text-Found.")
local op2 = mainframe:WaitForChild("S.C.P.F. Text-Sec.")
--[[]]--
assettext.Text = "Preparing to load.."
wait(2)
repeat wait() until game.Loaded
assettext.Text = "Loading assets."
repeat
local remaining = contentprovider.RequestQueueSize
local pie = (storednumber - remaining)
local percentage = math.floor(100 / storednumber * pie)
percentagetext.Text = ((percentage < 0 and "0") or percentage) .. " %"
percentagetext:FindFirstChild("AssetsLeft").Text = "Remaining: " .. remaining
wait()
until remaining <= 0
logoRot = false
assettext.Text = "Loading finished."
percentagetext.Text = "100 %"
percentagetext:FindFirstChild("AssetsLeft").Text = "finished."
assetdesc.Visible = false
credit.Visible = false
wait(.5)
FadeText(op1)
FadeText(op2)
FadeText(percentagetext)
FadeText(percentagetext:FindFirstChild("AssetsLeft"))
FadeText(assettext)
wait(4)
logo:TweenPosition(UDim2.new(0.5, 0, -.5, 0), "InOut", "Quint", 4)
wait(3.5)
cutscenescript.Disabled = false
local mId = 168146979
local vol = 0.25
for i = 1, #music_settings do
if player.Name == music_settings[i][1] then
mId = music_settings[i][math.random(2, #music_settings[i])]
vol = 0.5
print("True")
end
end
script.Parent.ScaryMusic.SoundId = "rbxassetid://" .. mId
script.Parent.ScaryMusic:Play()
script.Parent.ScaryMusic.Volume = vol
for i = 0, 1.05, 0.01 do
mainframe.BackgroundTransparency = i
wait()
end
end
local choosefunc = teamselection:WaitForChild("ChooseFunction")
local logo = teamselection:WaitForChild("LogoFirst")
local moduleframe = teamselection:WaitForChild("Module3D_Frame")
local appbtn = choosefunc:WaitForChild("AppBTN")
local helpbtn = choosefunc:WaitForChild("HelpBTN")
local playbtn = choosefunc:WaitForChild("PlayBTN")
-- [[ PAGE 1 ]] --
local page1 = teamselection:WaitForChild("Page1")
local teamchoose = page1:WaitForChild("TeamChoose")
local suitchoose = page1:WaitForChild("SuitChoose")
local teamR = page1:WaitForChild("T>")
local teamL = page1:WaitForChild("<T")
local suitR = page1:WaitForChild("S>")
local suitL = page1:WaitForChild("<S")
local nextBtn1 = page1:WaitForChild("NextBTN")
local backBtn1 = page1:WaitForChild("BackBTN")
-- [[ PAGE 2 ]] --
local page2 = teamselection:WaitForChild("Page2")
local facechoose = page2:WaitForChild("FaceChoose")
local hairchoose = page2:WaitForChild("HairChoose")
local skinchoose = page2:WaitForChild("SkinChoose")
local faceR = page2:WaitForChild("F>")
local faceL = page2:WaitForChild("<F")
local hairR = page2:WaitForChild("H>")
local hairL = page2:WaitForChild("<H")
local skinR = page2:WaitForChild("S>")
local skinL = page2:WaitForChild("<S")
local joinBtn2 = page2:WaitForChild("JoinBTN")
local backBtn2 = page2:WaitForChild("BackBTN")
-- [[ CREDIT ]] --
local helpcredit = teamselection:WaitForChild("Help+Credit")
-- [[ HR ]] --
local Curr_name = nil
-- [[ Cherker ;) ]] --
function checkTable(finding, list)
for i = 1, #list do
if finding == list[i] then
return true
else
return false
end
end
end
-- [[ Checking HR ]] --
local ifHR = nil
local ifL4 = false
if checkTable(player.UserId, team_settings["O5-1"]) then
ifHR = "O5-1"
elseif checkTable(player.UserId, team_settings["O5-2"]) then
ifHR = "O5-2"
elseif checkTable(player.UserId, team_settings["O5-3"]) then
ifHR = "O5-3"
elseif checkTable(player.UserId, team_settings["O5-4"]) then
ifHR = "O5-4"
elseif checkTable(player.UserId, team_settings["O5-5"]) then
ifHR = "O5-5"
elseif checkTable(player.UserId, team_settings["O5-6"]) then
ifHR = "O5-6"
elseif checkTable(player.UserId, team_settings["O5-7"]) then
ifHR = "O5-7"
elseif checkTable(player.UserId, team_settings["O5-8"]) then
ifHR = "O5-8"
elseif checkTable(player.UserId, team_settings["O5-9"]) then
ifHR = "O5-9"
elseif checkTable(player.UserId, team_settings["O5-10"]) then
ifHR = "O5-10"
elseif checkTable(player.UserId, team_settings["O5-11"]) then
ifHR = "O5-11"
elseif checkTable(player.UserId, team_settings["O5-12"]) then
ifHR = "O5-12"
elseif checkTable(player.UserId, team_settings["O5-13"]) then
ifHR = "O5-13"
elseif checkTable(player.UserId, team_settings["O5-X"]) then
ifHR = "O5-X"
elseif checkTable(player.UserId, team_settings["Site Director"]) then
ifHR = "Site Director"
elseif checkTable(player.UserId, team_settings.Administrator) then
ifHR = "Administrator"
elseif checkTable(player.UserId, team_settings["SpecialPeople"]) then
ifHR = "SpecialPeople"
else
ifHR = nil
end
local teamList = {} -- Please leave this one empty.
local teamIndex = 1
local suitIndex = 1
local hairIndex = 1
local faceIndex = 1
local skinIndex = 1
local selectedSuit = nil
local selectedSuitShirt = nil
local selectedSuitPants = nil
local selectedHair = nil
local selectedFace = nil
local selectedSkinColor = nil
function detect_classD()
-- [SET] --
local groupID_Main = 4219056
-- [[ ]] --
local v = 0
for i, plr in pairs(game.Players:GetChildren()) do
if plr:GetRankInGroup(groupID_Main) >= 1 and plr:GetRankInGroup(groupID_Main) < 3 then
v = v + 1
end
end
local cdm = choosefunc:FindFirstChild("CD/FP-Amount")
if v <= 0 then
cdm.Text = "NONE."
else
cdm.Text = v
end
end
if player:GetRankInGroup(4219056) == 9 then
for i, v in pairs(team_settings["Site Director"]) do
if v ~= player.UserId then
table.insert(team_settings["Site Director"], player.UserId)
end
end
end
function instert_teams()
-- [[ SETTINGS ]] --
local groupID_Main = 4219056
-- [[ DEPARTMENTS ]] --
local groupID_ScD = 00
local groupID_MTF = 00
local groupID_MD = 00
local groupID_SD = 00
local groupID_MaD = 00
local groupID_EC = 0
local groupID_IsD = 00
local groupID_DEA = 00
local groupID_IA = 00
local groupID_ET = 000
local groupID_DATA_EXPUNGED = 000
-- [[ Function ]] --
if player:IsInGroup(groupID_Main) then
if not checkTable(player.UserId, team_settings["Class E"]) then
-- [[ Player is not Class E ]] --
if ifHR ~= nil then
if ifHR ~= "O5-X" then
if ifHR ~= "SpecialPeople" then
table.insert(teamList, "O5 Council")
end
-- [[ Adding their suits to the list ]] --
if ifHR == "O5-1" then
elseif ifHR == "O5-2" then
elseif ifHR == "O5-3" then
elseif ifHR == "O5-4" then
-- for O5-4.
table.insert(suitsettings["O5 Council"], {"E&T Overseer", 1098940399, 1098940940})
elseif ifHR == "O5-5" then
table.insert(suitsettings["O5 Council"], {"O5-5 MaD suit", 423346027, 423346190})
table.insert(suitsettings["O5 Council"], {"Researcher suit", 1083270421, 1083270860})
elseif ifHR == "O5-6" then
elseif ifHR == "O5-7" then
elseif ifHR == "O5-8" then
-- For iiSxnic.
table.insert(suitsettings["O5 Council"], {"MaD Overseer", 422185939, 422185573})
elseif ifHR == "O5-9" then
elseif ifHR == "O5-10" then
elseif ifHR == "O5-11" then
elseif ifHR == "O5-12" then
elseif ifHR == "SpecialPeople" then
table.insert(teamList, "[REDACTED]")
elseif ifHR == "Site Director" then
table.insert(teamList, "Site Director")
end
else
table.insert(teamList, "O5-X")
-- For Wolfiyon.
table.insert(suitsettings["O5-X"], {"O5-X Suit2", 2102372829, 2102374558})
end
elseif player:GetRankInGroup(groupID_Main) == 9 then
table.insert(teamList, "Site Director")
elseif player:GetRankInGroup(groupID_Main) == 255 then
table.insert(teamList, "Administrator")
elseif player:GetRankInGroup(groupID_Main) > 00 and player:GetRankInGroup(groupID_Main) < 255 then
-- [[ All teamz ]] --
if player:GetRankInGroup(groupID_ScD) > 1 then
table.insert(teamList, "Scientific Department")
elseif player:GetRankInGroup(groupID_MTF) > 1 then
table.insert(teamList, "Mobile Task Force")
elseif player:GetRankInGroup(groupID_MD) > 1 then
table.insert(teamList, "Medical Department")
elseif player:GetRankInGroup(groupID_SD) > 1 then
table.insert(teamList, "Security Department")
elseif player:GetRankInGroup(groupID_MaD) > 1 then
table.insert(teamList, "Manufacturing Department")
elseif player:GetRankInGroup(groupID_EC) > 1 then
table.insert(teamList, "Ethics Committee")
elseif player:GetRankInGroup(groupID_IsD) > 1 then
table.insert(teamList, "Internal Seucurity Department")
elseif player:GetRankInGroup(groupID_DEA) > 1 then
table.insert(teamList, "Department Of External Affairs")
elseif player:GetRankInGroup(groupID_IA) > 1 then
table.insert(teamList, "Intelligence Agency")
elseif player:GetRankInGroup(groupID_ET) > 1 then
table.insert(teamList, "Engineering & Technical")
-- [[ SHIRT SETTINGS ]] --
if player:GetRoleInGroup(groupID_ET) == "Intern" then
table.insert(suitsettings["Engineering & Technical"], {"Intern", 1098935971, 1098940940})
elseif player:GetRoleInGroup(groupID_ET) == "Tech" then
table.insert(suitsettings["Engineering & Technical"], {"Engineer", 1098936146, 1098940940})
elseif player:GetRoleInGroup(groupID_ET) == "Electrical Engineer" then
table.insert(suitsettings["Engineering & Technical"], {"Engineer", 1098936146, 1098940940})
elseif player:GetRoleInGroup(groupID_ET) == "Senior Engineer" then
table.insert(suitsettings["Engineering & Technical"], {"Senior Engineer", 1098936275, 1098940940})
elseif player:GetRoleInGroup(groupID_ET) == "Supervisor" then
table.insert(suitsettings["Engineering & Technical"], {"Chief Engineer", 1098939984, 1098940940})
elseif player:GetRoleInGroup(groupID_ET) == "Assistant Director" then
table.insert(suitsettings["Engineering & Technical"], {"Director Engineer", 1098940159, 1098940940})
elseif player:GetRoleInGroup(groupID_ET) == "Director" then
table.insert(suitsettings["Engineering & Technical"], {"Director Engineer", 1098940159, 1098940940})
end
-- [[ ]]
elseif player:GetRankInGroup(groupID_DATA_EXPUNGED) > 1 then
table.insert(teamList, "[DATA EXPUNGED]")
else
table.insert(teamList, "Foundation Personnel")
end
elseif player:GetRankInGroup(groupID_Main) == 2 and player:GetRankInGroup(groupID_Main) < 3 then
table.insert(teamList, "Class E")
elseif player:GetRankInGroup(groupID_Main) == 1 and player:GetRankInGroup(groupID_Main) < 2 then
table.insert(teamList, "Class D")
end
if player:GetRankInGroup(groupID_Main) >= 7 then
ifL4 = true
print(player.Name .. " is L4+")
end
else
table.insert(teamList, "Class E")
end
else
table.insert(teamList, "Class D")
end
end
function updateSuit(teamname, table_index)
local findtable = suitsettings[teamname]
local getlist = findtable[table_index]
if findtable and getlist then
print("NAME: " .. getlist[1] .. ", SHIRTID: " .. getlist[2] .. ", PANTSID: " .. getlist[3])
return getlist[1], getlist[2], getlist[3]
end
end
function updateHair(table_index)
local findtable = hairsettings[table_index]
if findtable then
print("HATNAME: " .. findtable[1])
return findtable[1], findtable[2]
end
end
function updateFace(table_index)
local findtable = facesettings[table_index]
if findtable then
print("FACENAME: " .. findtable[1])
return findtable[1], findtable[2]
end
end
function updateSkinColor(table_index)
local findtable = skinsettings[table_index]
if findtable then
print("SKINNAME: " .. findtable[1])
return findtable[1], findtable[2]
end
end
--[[
function replaceHat(hat)
local character = nil
for i, object in pairs(game.Workspace.CurrentCamera:GetChildren()) do
if object:FindFirstChild("Humanoid") then
character = object
for i, v in pairs(object:GetChildren()) do
print("ObjectName: " .. v.Name)
end
end
end
repeat wait() until character
print("Character found: Objectname: `" .. character.Name .. "`")
for i, item in pairs(character:GetChildren()) do
if item:IsA("Hat") then
item:Destroy()
end
end
local find_hat = hat
find_hat:Clone().Parent = character
]]--
local pointName = "SpawnRoom_" .. player.Name
local cameraSuccess = false
while cameraSuccess == false do
--
cameraSuccess, failmsg = pcall(function()
-- [[ WAITING FOR CHARACTER ]] --
repeat wait() until player and player.Character
repeat wait() until player.Character:IsDescendantOf(workspace)
local currentcam = workspace.CurrentCamera
--server_event:Fire(player, "Attach_Character", currentcam)
event:FireServer("AddTP", pointName)
wait(1)
local getp = workspace:FindFirstChild(pointName)
if getp ~= nil then
event:FireServer("Teleport", getp:FindFirstChild("PartSpawn"))
event:FireServer("Freeze", true)
else
warn("WARNING - NIL")
end
end)
--
end
wait(1)
--[[
local CP = workspace:FindFirstChild(pointName):FindFirstChild("CamPart")
if CP ~= nil then
print("CP = NOT NIL")
local dif = player.Character.Head.CFrame + Vector3.new(0.75, 0, -10)
local enteties = {CP, dif}
local enteties2 = {CP.Cam, (dif + Vector3.new(0, 0, 1))}
event:FireServer("SetCamAngle",enteties)
event:FireServer("SetCamAngle",enteties2)
else
print("CP = NIL")
end
]]--
wait(1)
function HandleStartup()
-- [[ Checking for HR first. ]] --
local typwriter = teamselection:WaitForChild("Typr")
local text = "SITE - 112"
local welcometext = choosefunc:WaitForChild("Welcome")
if checkTable(player.UserId, team_settings["Class E"]) == false then
print(player.Name .. " is not class E")
if ifHR ~= nil then
Curr_name = ifHR
else
Curr_name = player.Name
end
else
Curr_name = player.Name
end
typwriter.Visible = true
for i = 1, #text do
typwriter.Text = string.sub(text, 1, i)
wait(.5)
end
typwriter:FindFirstChild("Line").Visible = true
typwriter:FindFirstChild("Line"):TweenSize(UDim2.new(0.235, 0, 0.006, 0), "Out", "Quint", 2)
wait(2)
FadeText(typwriter)
wait(1)
spawn(function()
print("F1")
local darken = teamselection:WaitForChild("Darken")
darken.BackgroundTransparency = 1
darken.Visible = true
while darken.BackgroundTransparency > 0 do
darken.BackgroundTransparency = darken.BackgroundTransparency - 0.035
wait()
end
end)
wait(2)
typwriter:FindFirstChild("Line"):TweenSize(UDim2.new(0, 0, 0.006, 0), "Out", "Quint", 2)
wait(1)
logo.Position = UDim2.new(-1, 0, 0, 0)
logo.Visible = true
logo:TweenPosition(UDim2.new(0, 0, 0, 0), "Out", "Quint", 3)
wait(1)
typwriter:FindFirstChild("Line").Visible = false
local positions = {}
for i, frame in pairs(choosefunc:GetChildren()) do
if frame then
table.insert(positions, frame.Position)
wait(.001)
frame.Position = frame.Position + UDim2.new(-1, 0, 0, 0)
end
end
choosefunc.Position = choosefunc.Position + UDim2.new(-1, 0, 0, 0)
choosefunc.Visible = true
choosefunc:TweenPosition(UDim2.new(0.025, 0, 0.23, 0), "Out", "Quint", 3)
instert_teams()
detect_classD()
wait(1)
moduleframe.Position = moduleframe.Position + UDim2.new(1, 0, 0, 0)
-- [[ Finding suits, face, hair etc ]] --
local suitname, suitShirt, suitPants = updateSuit(teamList[1], 1)
suitchoose:FindFirstChild("TextLabel").Text = suitname
-- [[ Let's go and put in the values! ]] --
selectedSuit = suitchoose
selectedSuitShirt = suitShirt
selectedSuitPants = suitPants
-- [[ Hair ]] --
if not ifL4 then
local hairname, hairmodel = updateHair(1)
selectedHair = hairname
event:FireServer("Replace_hat", hairmodel)
local facename, faceID = updateFace(1)
local skin_name, skinColor = updateSkinColor(1)
print(facename .. " || " .. faceID)
event:FireServer("BodyColors", skinColor)
event:FireServer("Change_Face", faceID)
event:FireServer("RemovePackages", nil)
else
end
-- [[ Getting them ]] --
event:FireServer("ReplaceClothing", {selectedSuitShirt, selectedSuitPants})
-- [[ Greeting and other stuff ]] --
welcometext.Text = "Welcome, " .. Curr_name .. "!"
moduleframe:TweenPosition(UDim2.new(0.65, 0, 0.5, 0), "Out", "Quint", 2)
cutscenescript.Disabled = true
wait(0.05)
local camera = game.Workspace.CurrentCamera
local partfocus = workspace:FindFirstChild(pointName):FindFirstChild("CamPart")
camera.CameraType = Enum.CameraType.Scriptable
camera.CameraSubject = partfocus
event:FireServer("SetCharAngle", partfocus)
camera:Interpolate(partfocus.CFrame, partfocus:FindFirstChild("Cam").CFrame, 3)
coroutine.resume(coroutine.create(function()
local findblur = game.Workspace.CurrentCamera:WaitForChild("Blur")
if findblur then
while findblur.Size > 0 do
findblur.Size = findblur.Size - 0.5
wait()
end
end
end))
delay(3, function()
print("F2")
local darken = teamselection:WaitForChild("Darken")
darken.BackgroundTransparency = 0
while darken.BackgroundTransparency < 1 do
darken.BackgroundTransparency = darken.BackgroundTransparency + 0.01
wait()
end
darken.Visible = true
end)
delay(4, function()
local chosen = false
local indexlist = 0
for i = 1, #music_settings do
if player.Name == music_settings[i][1] then
chosen = true
indexlist = i
end
end
if chosen then
local m = teamselection:WaitForChild("NowPlaying")
local subbedasset = string.sub(tostring(script.Parent.ScaryMusic.SoundId), 14)
print("Subbed asset: " .. subbedasset)
local product_info = game:GetService("MarketplaceService"):GetProductInfo( tonumber(subbedasset) )
m:TweenPosition(UDim2.new(0.4, 0, 0.8, 0), "Out", "Quint", 2)
m.TextLabel.Text = ""
wait(1)
m.TextLabel.Text = "Now playing: " .. product_info.Name
m.TextLabel.Position = UDim2.new(1, 0, 0, 0)
m.TextLabel:TweenPosition(UDim2.new(-1, 0, 0, 0), "Out", "Linear", 8)
wait(8)
m:TweenPosition(UDim2.new(0.4, 0, 1.4, 0), "InOut", "Quint", 2)
end
end)
for i, frame in pairs(choosefunc:GetChildren()) do
if frame then
frame:TweenPosition(positions[i], "Out", "Quint", 2)
wait(.3)
end
end
wait(.6)
canClick = true
end
-- [[ More Functions ]] --
for _, btn in pairs(choosefunc:GetChildren()) do
if btn:IsA("TextButton") then
btn.MouseEnter:connect(function()
if canClick then
hoversound:Play()
btn_line(btn, true)
end
end)
btn.MouseLeave:connect(function()
if canClick then
btn_line(btn, false)
end
end)
end
end
for _, btn in pairs(page1:GetChildren()) do
if btn:IsA("TextButton") then
btn.MouseEnter:connect(function()
if canClick then
hoversound:Play()
btn_line(btn, true)
end
end)
btn.MouseLeave:connect(function()
if canClick then
btn_line(btn, false)
end
end)
end
end
for _, btn in pairs(page2:GetChildren()) do
if btn:IsA("TextButton") then
btn.MouseEnter:connect(function()
if canClick then
hoversound:Play()
btn_line(btn, true)
end
end)
btn.MouseLeave:connect(function()
if canClick then
btn_line(btn, false)
end
end)
end
end
pop_up:FindFirstChild("CUST").MouseEnter:connect(function()
if canClick then
hoversound:Play()
btn_line(pop_up:FindFirstChild("CUST"), true)
end
end)
pop_up:FindFirstChild("CUST").MouseLeave:connect(function()
if canClick then
btn_line(pop_up:FindFirstChild("CUST"), false)
end
end)
pop_up:FindFirstChild("DEF").MouseEnter:connect(function()
if canClick then
hoversound:Play()
btn_line(pop_up:FindFirstChild("DEF"), true)
end
end)
pop_up:FindFirstChild("DEF").MouseLeave:connect(function()
if canClick then
btn_line(pop_up:FindFirstChild("DEF"), false)
end
end)
-- [[ ]] --
helpcredit:FindFirstChild("BackBTN").MouseEnter:connect(function()
if canClick then
hoversound:Play()
btn_line(helpcredit:FindFirstChild("BackBTN"), true)
end
end)
helpcredit:FindFirstChild("BackBTN").MouseLeave:connect(function()
if canClick then
btn_line(helpcredit:FindFirstChild("BackBTN"), false)
end
end)
-- [[ ]] --
function btn_line(button, onoff)
local TWT = 0.25
coroutine.resume(coroutine.create(function()
if onoff == true then
local done = false
if not done then
button:FindFirstChild("Sign").Visible = true
button:FindFirstChild("Sign"):TweenSize(UDim2.new(1, 0, 0, 0.02), "Out", "Quint", TWT, false, nil)
wait(TWT)
button:FindFirstChild("Sign").Size = UDim2.new(1, 0, 0, 0.02)
done = true
end
else
local done = false
if not done then
button:FindFirstChild("Sign"):TweenSize(UDim2.new(0, 0, 0, 0.02), "Out", "Quint", TWT, false, nil)
wait(TWT)
button:FindFirstChild("Sign").Size = UDim2.new(0, 0, 0, 0.02)
button:FindFirstChild("Sign").Visible = false
done = true
end
end
end))
end
function main_dissapear(objectpart)
local positions = {}
for i, frame in pairs(objectpart:GetChildren()) do
if frame then
table.insert(positions, frame.Position + UDim2.new(-1, 0, 0, 0))
end
end
for i, frame in pairs(objectpart:GetChildren()) do
if frame then
frame:TweenPosition(positions[i], "Out", "Quint", 2)
wait(.3)
end
end
wait(0.3)
objectpart:TweenPosition(UDim2.new(0.025 - 1, 0, 0.23, 0), "InOut", "Quint", 3, false, nil)
end
function Handle_Ending()
coroutine.resume(coroutine.create(function()
local humanoid = player.Character:FindFirstChild("Humanoid")
local torso = player.Character:FindFirstChild("Torso")
coroutine.resume(coroutine.create(function()
print("F3")
local d = teamselection:WaitForChild("Darken")
local t = 1
d.Visible = true
d.BackgroundTransparency = 1
while t > 0 do
t = t - 0.05
d.BackgroundTransparency = t
wait()
end
end))
if humanoid then
local camera = game.Workspace.CurrentCamera
local focus = humanoid
camera.CameraType = Enum.CameraType.Scriptable
camera.CameraSubject = humanoid
camera:Interpolate(torso.CFrame, player.Character:FindFirstChild("Head").CFrame, 4.5)
wait(5.5 / 2)
if teamList[teamIndex] == "Class D" then
delay(1, function()
scpfevents:FireServer("PrepareCD")
wait(0.1)
scpfevents:FireServer("TPCD")
end)
end
wait(5.5 / 2)
camera.CameraType = Enum.CameraType.Custom
coroutine.resume(coroutine.create(function()
print("F4")
local d = teamselection:WaitForChild("Darken")
local t = 0
d.BackgroundTransparency = 0
while t < 1 do
t = t + 0.05
d.BackgroundTransparency = t
wait()
end
d.Visible = false
-- important
game:GetService("StarterGui"):SetCoreGuiEnabled(Enum.CoreGuiType.All, true)
game:GetService("StarterGui"):SetCoreGuiEnabled(Enum.CoreGuiType.PlayerList, false)
game:GetService("StarterGui"):SetCore("TopbarEnabled", true)
chatGUI.Enabled = true
-- haha
event:FireServer("MakeAmbience")
event:FireServer("NoGUI")
end))
end
end))
end
function moveList(listname, text)
local textInside = listname:FindFirstChild("TextLabel")
if textInside then
coroutine.resume(coroutine.create(function()
textInside:TweenPosition(UDim2.new(1, 0, 0, 0), "Out", "Quint", 0.5)
wait(0.5)
textInside.Position = UDim2.new(-1, 0, 0, 0)
textInside.Text = text
textInside:TweenPosition(UDim2.new(0, 0, 0, 0), "Out", "Quint", 0.5)
end))
end
end
-- [[ Events ]] --
local creditframe = helpcredit:WaitForChild("CreditFrame")
local logoV = helpcredit:WaitForChild("Logo")
local backbutton_help = helpcredit:WaitForChild("BackBTN")
-- [[ PLAYING BUTTONS ]] --
function do_main()
local pos_frames = {}
for i, v in pairs(page1:GetChildren()) do
table.insert(pos_frames, v.Position)
if v.Name == "<S" or v.Name == "<T" or v.Name == "BackBTN" or v.Name == "TextLabel" then
v.Position = v.Position + UDim2.new(-1, 0, 0, 0)
elseif v.Name == "S>" or v.Name == "T>" or v.Name == "NextBTN" then
v.Position = v.Position + UDim2.new(1, 0, 0, 0)
elseif v.Name == "TeamChoose" then
v.Position = v.Position + UDim2.new(0, 0, -1, 0)
else
v.Position = v.Position + UDim2.new(0, 0, 1, 0)
end
end
page1.Position = page1.Position + UDim2.new(-1, 0, 0, 0)
page1.Visible = true
page1:TweenPosition(UDim2.new(0.025, 0, 0.23, 0), "Out", "Quint", 2)
wait(1)
for i, frame in pairs(page1:GetChildren()) do
if frame then
frame:TweenPosition(pos_frames[i], "Out", "Quint", 2)
wait(.3)
end
end
wait(.3)
canClick = true
end
function do_mainP2()
local pos_frames = {}
for i, v in pairs(page2:GetChildren()) do
table.insert(pos_frames, v.Position)
if v.Name == "<S" or v.Name == "<H" or v.Name == "<F" or v.Name == "BackBTN" or v.Name == "TextLabel" then
v.Position = v.Position + UDim2.new(-1, 0, 0, 0)
elseif v.Name == "S>" or v.Name == "H>" or v.Name == "F>" or v.Name == "JoinBTN" then
v.Position = v.Position + UDim2.new(1, 0, 0, 0)
elseif v.Name == "HairChoose" then
v.Position = v.Position + UDim2.new(0, 0, -1, 0)
else
v.Position = v.Position + UDim2.new(0, 0, 1, 0)
end
end
page2.Position = page1.Position + UDim2.new(-1, 0, 0, 0)
page2.Visible = true
page2:TweenPosition(UDim2.new(0.025, 0, 0.23, 0), "Out", "Quint", 2)
wait(1)
for i, frame in pairs(page2:GetChildren()) do
if frame then
frame:TweenPosition(pos_frames[i], "Out", "Quint", 2)
wait(.3)
end
end
wait(.3)
canClick = true
print("True")
end
playbtn.MouseButton1Click:connect(function()
if canClick then
clicksound:Play()
canClick = false
main_dissapear(choosefunc)
print("TEAMS: " .. table.concat(teamList, ", "))
if #teamList > 0 then
teamchoose:FindFirstChild("TextLabel").Text = teamList[1]
local suitname, suitShirt, suitPants = updateSuit(teamList[1], 1)
suitchoose:FindFirstChild("TextLabel").Text = suitname
-- [[ Let's go and put in the values! ]] --
selectedSuit = suitchoose
selectedSuitShirt = suitShirt
selectedSuitPants = suitPants
end
choosefunc:TweenPosition(UDim2.new(-1, 0, 0.23, 0), "Out", "Quint", 2, false)
wait(1.5)