Okay, I have done it, I got this right now:
```wait(3)
local con
local debounce = true
--[[
Disabling CoreGuis
--]]
game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack,false)
game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.EmotesMenu,false)
game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.PlayerList,false)
workspace.MainMenu:WaitForChild("right1"):WaitForChild("one"):WaitForChild("Frame"):WaitForChild("plrframe"):WaitForChild("bull"):WaitForChild("ImageLabel").Image = "https://www.roblox.com/bust-thumbnail/image?userId=".. game.Players.LocalPlayer.UserId .."&width=420&height=420&format=png"
workspace.MainMenu.right1.one.Frame.plrframe.tex.Text = game.Players.LocalPlayer.Name
workspace.MainMenu.right1.one.Frame.plrframe.Bottom.Text = game.Players.LocalPlayer.UserId
workspace.MainMenu.right1.one.Frame.clearnace.TextLabel.Text = tostring(game.Players.LocalPlayer:GetRoleInGroup(game.ReplicatedStorage.groupid.Value))
script.music:Play()
local loadables = {}
local amount_loaded = 0
local oldamount = 0
game.Players.LocalPlayer.PlayerGui:SetTopbarTransparency(0)
for i = 1, #loadables do
if amount_loaded - oldamount >= 100 then
oldamount = amount_loaded
game.Players.LocalPlayer.PlayerGui.loading["0"].Frame:TweenPosition(UDim2.new(0,0,-2.5 - (4/(#loadables/amount_loaded)),0),"InOut","Sine",5,true)
end
coroutine.wrap(function()
game.ContentProvider:PreloadAsync({loadables[i]})
amount_loaded = amount_loaded + 1
end)()
end
while amount_loaded ~= #loadables do
wait()
end
local DefaultCFrame
local introbusy
coroutine.wrap(function()
local Mouse = game.Players.LocalPlayer:GetMouse()
local Camera = game.Workspace.CurrentCamera
local cam = game.Workspace.CurrentCamera
cam.CameraType = "Scriptable"
cam.CameraSubject = workspace.campart
cam.CFrame = workspace.campart.CFrame
DefaultCFrame = workspace.campart.CFrame
local Scale = 100
introbusy = true
function Update()
if introbusy == true then
-- get the center of the screen
local Center = Vector2.new(Camera.ViewportSize.X/2, Camera.ViewportSize.Y/2)
-- get the movement (it's in studs, and the mouse properties are in pixels, so you want to divide it by your scale to not move the camera really really far)
local MoveVector = Vector3.new((Mouse.X-Center.X)/(-Scale), (Mouse.Y-Center.Y)/(-Scale), 0)
-- CFrame * CFrame makes it work the same regardless of rotation, where addition just makes it work for one direction
-- Camera.CFrame = DefaultCFrame * CFrame.new(DefaultCFrame.p + MoveVector)
--Camera.CFrame = DefaultCFrame * CFrame.new(MoveVector)
--Camera.CFrame = DefaultCFrame * CFrame.new(DefaultCFrame.p + MoveVector)
--Camera.CFrame = Camera.CFrame:Lerp(CFrame.new(DefaultCFrame.p,MoveVector), 0.5)
game:GetService("TweenService"):Create(workspace.CurrentCamera, TweenInfo.new(0.1, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut), {CFrame = DefaultCFrame * CFrame.Angles(math.rad(MoveVector.Y), math.rad(MoveVector.X), 0)}):Play()
--Camera.CFrame = DefaultCFrame * CFrame.Angles(math.rad(MoveVector.Y), math.rad(MoveVector.X), 0)
end
end
local gui = workspace.MainMenu.left1.one.Frame.DividerRound.ScrollingFrame
local currentpos = UDim2.new(0.05,0,0,0)
for i,v in pairs(game.Teams:GetChildren()) do wait()
if v.Name ~= "Class-D" and v.Name ~= "Unassigned" and v.Name ~= "Solitary" then
if game.Players.LocalPlayer:GetRankInGroup(v.id.Value) >= 1 or game.Players.LocalPlayer:GetRankInGroup(v.id.Value) == 1 or (v.Name == "Class-D" and game.Players.LocalPlayer:GetRankInGroup(game.ReplicatedStorage.groupid.Value) == 0) then
if (v.Name == "Class-D" and game.Players.LocalPlayer:GetRankInGroup(game.ReplicatedStorage.groupid.Value) >= 5) then return end
local clone = workspace.MainMenu.left1.one.Frame.DividerRound.ScrollingFrame.TextButton:Clone()
clone.MouseButton1Click:connect(function()
clone.TextButton_Roundify_6px:TweenSize(UDim2.new(1,6,1,6),"InOut","Linear",0.21,true)
local clone2 = script.Sounds.click:Clone()
clone2.Parent = script
clone2:Play()
script.team.Value = clone.Text
workspace.MainMenu.left1.one.Frame.TextButton:TweenPosition(UDim2.new(0,-1,0.75,0),"InOut",0.5,true)
workspace.MainMenu.right1.one.Frame.Frame.TextLabel.Text = clone.Text
workspace.MainMenu.right2.one.Frame.plrframe.Stats.Text = clone.text
workspace.MainMenu.right2.one.Frame.plrframe.Bottom.Text = game.Teams:FindFirstChild(clone.Text).desc.Value
wait(0.21)
clone2:Destroy()
clone.TextButton_Roundify_6px:TweenSize(UDim2.new(1,0,1,0),"InOut","Sine",0.21,true)
end)
clone.Parent = gui
if i == 1 then
clone.Position = currentpos
local setpos = currentpos
clone.MouseEnter:connect(function()
clone:TweenPosition(setpos + UDim2.new(0.05,0,0,0,0),"InOut","Sine",0.5,true)
end)
clone.MouseLeave:connect(function()
clone:TweenPosition(setpos,"InOut","Sine",0.5,true)
end)
else
clone.Position = currentpos + UDim2.new(0,0,0.04,0)
currentpos = currentpos + UDim2.new(0,0,0.04,0)
local setpos = currentpos
clone.MouseEnter:connect(function()
clone:TweenPosition(setpos + UDim2.new(0.05,0,0,0,0),"InOut","Sine",0.5,true)
end)
clone.MouseLeave:connect(function()
clone:TweenPosition(setpos,"InOut","Sine",0.5,true)
end)
end
clone.Text = v.Name
clone.Name = v.Name
clone.TextButton_Roundify_12px.UIGradient.Color = ColorSequence.new(v.TeamColor.Color,Color3.new(0.3125,0.3125,0.3125))
end
end
end
gui.TextButton.Visible = false
con = game:GetService("RunService").RenderStepped:Connect(Update)
end)()
-- On game start display text & tween etc
wait(1)
game.Players.LocalPlayer.PlayerGui.loading["0"].Frame:TweenPosition(UDim2.new(0,0,-6.5,0),"InOut","Sine",5,true)
wait(5)
game:GetService("TweenService"):Create(game.Players.LocalPlayer.PlayerGui.dot.TextLabel,TweenInfo.new(1, Enum.EasingStyle.Sine,Enum.EasingDirection.Out), {TextTransparency= 1}):Play()
wait(1)
game.Players.LocalPlayer.PlayerGui.dot.TextLabel.Text = "This game was designed by the Oneware Studios team."
game:GetService("TweenService"):Create(game.Players.LocalPlayer.PlayerGui.dot.TextLabel,TweenInfo.new(1, Enum.EasingStyle.Sine,Enum.EasingDirection.Out), {TextTransparency= 0}):Play()
wait(2)
game:GetService("TweenService"):Create(game.Players.LocalPlayer.PlayerGui.dot.TextLabel,TweenInfo.new(1, Enum.EasingStyle.Sine,Enum.EasingDirection.Out), {TextTransparency= 1}):Play()
wait(1)
game.Players.LocalPlayer.PlayerGui.dot.TextLabel.Text = "Welcome, " .. game.Players.LocalPlayer.Name
game:GetService("TweenService"):Create(game.Players.LocalPlayer.PlayerGui.dot.TextLabel,TweenInfo.new(1, Enum.EasingStyle.Sine,Enum.EasingDirection.Out), {TextTransparency= 0}):Play()
wait(2)
coroutine.wrap(function()
for i = 1,30 do wait()
game.Players.LocalPlayer.PlayerGui.dot.TextLabel.TextTransparency = game.Players.LocalPlayer.PlayerGui.dot.TextLabel.TextTransparency +0.033333333333333
game.Players.LocalPlayer.PlayerGui.loading["0"].Frame.BackgroundTransparency = game.Players.LocalPlayer.PlayerGui.loading["0"].Frame.BackgroundTransparency + 0.0333333333333
game.Players.LocalPlayer.PlayerGui.loading["0"]["0"].ImageTransparency = game.Players.LocalPlayer.PlayerGui.loading["0"]["0"].ImageTransparency + 0.0333333333333
game.Players.LocalPlayer.PlayerGui.loading["0"].Frame.BackgroundTransparency = game.Players.LocalPlayer.PlayerGui.loading["0"].Frame.BackgroundTransparency +0.03
end
game.Players.LocalPlayer.PlayerGui.loading.Enabled = false
end)()
coroutine.wrap(function()
local steps = 25
for i,v in pairs(game.Players.LocalPlayer.PlayerGui.dot.Frame:GetChildren()) do wait()
game:GetService("TweenService"):Create(v,TweenInfo.new(1, Enum.EasingStyle.Sine,Enum.EasingDirection.Out), {BackgroundTransparency= 1}):Play()
end
end)()
-- Button events.'
workspace.MainMenu.left1.one.Frame.TextButton.MouseButton1Click:connect(function()
workspace.MainMenu.left1.one.Frame.TextButton:TweenPosition(UDim2.new(0,-1,1.75,0),"InOut","Sine",1,true)
local clone2 = script.Sounds.click:Clone()
clone2.Parent = script
clone2:Play()
introbusy = false
wait(0.1)
game:GetService("TweenService"):Create(workspace.CurrentCamera, TweenInfo.new(4, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut), {CFrame = workspace.campart.campart.CFrame}):Play()
wait(4)
DefaultCFrame = workspace.campart.campart.CFrame
introbusy = true
debounce = false
clone2:Destroy()
end)
local currentpos2 = UDim2.new(0.5,0,0.05,0)
for i,v in pairs(game.ReplicatedStorage.news:GetChildren()) do
local clone = workspace.MainMenu.left2.one.Frame.news.ScrollingFrame.NewsFrame:Clone()
clone.Parent = workspace.MainMenu.left2.one.Frame.news.ScrollingFrame
if i == 1 then
clone.Position = currentpos2
local setpos = currentpos2
print(setpos)
currentpos = setpos + UDim2.new(0,0,0.125,0)
else
local setpos = currentpos2
currentpos2 = setpos + UDim2.new(0,0,0.125,0)
clone.Position = currentpos2
end
clone.Name = v:FindFirstChild("Name").Value
clone.headline.Text = v:FindFirstChild("Name").Value
clone.TextLabel.Text = v.Desc.Value
end
workspace.MainMenu.right2.one.Frame.TextButton.MouseButton1Click:Connect(function()
local steps = 25
if debounce == false then
debounce = true
for i,v in pairs(game.Players.LocalPlayer.PlayerGui.dot.Frame:GetChildren()) do wait()
coroutine.wrap(function()
game:GetService("TweenService"):Create(v,TweenInfo.new(1, Enum.EasingStyle.Sine,Enum.EasingDirection.Out), {BackgroundTransparency= 0}):Play()
end)()
end
local val = game.ReplicatedStorage.changeteam:InvokeServer(script.team.Value)
repeat wait() until val ~= nil
wait(1)
if val == true then
introbusy = false
wait()
con:Disconnect()
workspace.CurrentCamera.CameraType = Enum.CameraType.Custom
workspace.CurrentCamera.CameraSubject = game.Players.LocalPlayer.Character.Humanoid
workspace.CurrentCamera.CFrame = game.Players.LocalPlayer.Character.Head.CFrame
for i,v in pairs(game.Players.LocalPlayer.PlayerGui.dot.Frame:GetChildren()) do wait()
game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack,true)
coroutine.wrap(function()
game:GetService("TweenService"):Create(v,TweenInfo.new(1, Enum.EasingStyle.Sine,Enum.EasingDirection.Out), {BackgroundTransparency= 1}):Play()
end)()
end
end
end
end)``