local plyr = game.Players.LocalPlayer
local character
plyr.CharacterAdded:Connect(function(c)
character = c
end)
local gui = plyr:WaitForChild("PlayerGui")
local ui = gui:WaitForChild("ui")
local assetObject = script:WaitForChild("Assets")
local assets = {}
for a,b in next,assetObject:GetChildren() do
assets[b.Name] = b
end
local teams = game:GetService("Teams")
local tS = game:GetService("TweenService")
local lighting = game.Lighting
function tween(t,s,d,p,o)
return tS:Create(o,TweenInfo.new(t,Enum.EasingStyle[s],Enum.EasingDirection[d]),p)
end
local rep = game.ReplicatedStorage
local events = rep:WaitForChild("Events")
local event = events:WaitForChild("event")
function teamChoose()
local chooseUI = assets.teamChoose:Clone()
chooseUI.Parent = ui
tween(1,"Sine","Out",{Size = 24},lighting.Blur):Play()
local finished
local workerDown,residentDown = chooseUI.worker.MouseButton1Down:Connect(function()
event:FireServer({reason = "changeTeam"; team = teams.Worker})
finished = true
end),chooseUI.resident.MouseButton1Down:Connect(function()
event:FireServer({reason = "changeTeam"; team = teams.Resident})
finished = true
end)
repeat wait() until finished
tween(0.5,"Sine","Out",{Size = 0},lighting.Blur):Play()
workerDown:disconnect()
residentDown:disconnect()
chooseUI:Destroy()
end
teamChoose()
{"html5":"htmlmixed","css":"css","javascript":"javascript","php":"php","python":"python","ruby":"ruby","lua":"text\/x-lua","bash":"text\/x-sh","go":"go","c":"text\/x-csrc","cpp":"text\/x-c++src","diff":"diff","latex":"stex","sql":"sql","xml":"xml","apl":"apl","asterisk":"asterisk","c_loadrunner":"text\/x-csrc","c_mac":"text\/x-csrc","coffeescript":"text\/x-coffeescript","csharp":"text\/x-csharp","d":"d","ecmascript":"javascript","erlang":"erlang","groovy":"text\/x-groovy","haskell":"text\/x-haskell","haxe":"text\/x-haxe","html4strict":"htmlmixed","java":"text\/x-java","java5":"text\/x-java","jquery":"javascript","mirc":"mirc","mysql":"sql","ocaml":"text\/x-ocaml","pascal":"text\/x-pascal","perl":"perl","perl6":"perl","plsql":"sql","properties":"text\/x-properties","q":"text\/x-q","scala":"scala","scheme":"text\/x-scheme","tcl":"text\/x-tcl","vb":"text\/x-vb","verilog":"text\/x-verilog","yaml":"text\/x-yaml","z80":"text\/x-z80"}