Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print("Citadel Engine 1.0 loaded")
- -- SCRIPTED BY BLUEFREDY --
- ---------------------------
- player = game.Players.LocalPlayer
- char = player.Character
- group = 1155390
- allies = {}
- defenders = "Bright orange"
- raiders = "Medium blue"
- function checkallie(ally)
- for a = 1, #allies do
- if player:IsInGroup(allies[a]) then
- return true
- else
- return false
- end
- end
- end
- function tween1out(TextButton)
- TextButton:TweenPosition(UDim2.new(0, 30, TextButton.Position.Y.Scale, TextButton.Position.Y.Offset), "Out", "Sine", 0.25, true)
- TextButton.TextColor3 = Color3.new(255/255, 175/255, 0/255)
- end
- function tween1in(TextButton)
- TextButton:TweenPosition(UDim2.new(0, 15, TextButton.Position.Y.Scale, TextButton.Position.Y.Offset), "Out", "Sine", 0.25, true)
- TextButton.TextColor3 = Color3.new(255/255, 255/255, 255/255)
- end
- function tween1down(Frame)
- Frame:TweenPosition(UDim2.new(-2.5, 0, Frame.Position.Y.Scale, Frame.Position.Y.Offset), "Out", "Sine", 0.25, true)
- function tween2down(Frame2)
- Frame2:TweenPosition(UDim2.new(0, 0, Frame.Position.Y.Scale, Frame.Position.Y.Offset), "Out", "Sine", 0.25, true)
- end
- end
- function returnmenu(Button, Frame2, Frame)
- Button.MouseButton1Down:connect(function()
- script.Parent.MouseClick:play()
- Frame2:TweenPosition(UDim2.new(3.5, 0, Frame2.Position.Y.Scale, Frame2.Position.Y.Offset), "Out", "Sine", 0.25, true)
- Frame:TweenPosition(UDim2.new(0, 0, Frame.Position.Y.Scale, Frame.Position.Y.Offset), "Out", "Sine", 0.25, true)
- end)
- end
- function notification()
- note = script.Parent.Frame.Notifation
- note:TweenPosition(UDim2.new(1, 10, note.Position.Y.Scale, note.Position.Y.Offset), "Out", "Sine", 0.125, true)
- wait(1)
- note:TweenPosition(UDim2.new(3.5, 0, note.Position.Y.Scale, note.Position.Y.Offset), "Out", "Sine", 0.125, true)
- end
- function decideteam()
- local lock = false
- defend = script.Parent.Frame.Teams.FendButton
- raid = script.Parent.Frame.Teams.RaidButton
- note = script.Parent.Frame.Notifation
- defend.MouseButton1Down:connect(function()
- if lock == false then
- lock = true
- if player:IsInGroup(group) or checkallie == true then
- script.Parent.MouseClick:play()
- --
- player.TeamColor = BrickColor.new(defenders)
- else
- script.Parent.Error:play()
- note.Frame.TextLabel2.Text = string.upper("You're not in Citadel Pact or an Allie!")
- notification()
- --
- wait(0.5)
- --
- end
- lock = false
- end
- end)
- raid.MouseButton1Down:connect(function()
- if lock == false then
- lock = true
- script.Parent.MouseClick:play()
- --
- player.TeamColor = BrickColor.new(raiders)
- end
- wait(0.5)
- --
- lock = false
- end)
- end
- script.Parent.Frame.Buttons.JoinButton.MouseEnter:connect(function()
- tween1out(script.Parent.Frame.Buttons.JoinButton)
- script.Parent.Frame.Buttons.JoinButton.MouseLeave:connect(function()
- tween1in(script.Parent.Frame.Buttons.JoinButton)
- end)
- end)
- script.Parent.Frame.Buttons.OptionsButton.MouseEnter:connect(function()
- tween1out(script.Parent.Frame.Buttons.OptionsButton)
- script.Parent.Frame.Buttons.OptionsButton.MouseLeave:connect(function()
- tween1in(script.Parent.Frame.Buttons.OptionsButton)
- end)
- end)
- script.Parent.Frame.Buttons.RulesButton.MouseEnter:connect(function()
- tween1out(script.Parent.Frame.Buttons.RulesButton)
- script.Parent.Frame.Buttons.RulesButton.MouseLeave:connect(function()
- tween1in(script.Parent.Frame.Buttons.RulesButton)
- end)
- end)
- script.Parent.Frame.Buttons.StatsButton.MouseEnter:connect(function()
- tween1out(script.Parent.Frame.Buttons.StatsButton)
- script.Parent.Frame.Buttons.StatsButton.MouseLeave:connect(function()
- tween1in(script.Parent.Frame.Buttons.StatsButton)
- end)
- end)
- script.Parent.Frame.Buttons.JoinButton.MouseButton1Down:connect(function()
- script.Parent.MouseClick:play()
- tween1in(script.Parent.Frame.Buttons.JoinButton)
- tween1down(script.Parent.Frame.Buttons) tween2down(script.Parent.Frame.Teams)
- script.Parent.Frame.Teams.JoinButton.MouseEnter:connect(function()
- tween1out(script.Parent.Frame.Teams.JoinButton)
- script.Parent.Frame.Teams.JoinButton.MouseLeave:connect(function()
- tween1in(script.Parent.Frame.Teams.JoinButton)
- end)
- end)
- script.Parent.Frame.Teams.BackButton.MouseEnter:connect(function()
- tween1out(script.Parent.Frame.Teams.BackButton)
- script.Parent.Frame.Teams.BackButton.MouseLeave:connect(function()
- tween1in(script.Parent.Frame.Teams.BackButton)
- end)
- end)
- decideteam()
- returnmenu(script.Parent.Frame.Teams.BackButton, script.Parent.Frame.Teams, script.Parent.Frame.Buttons)
- end)
- script.Parent.Frame.Buttons.RulesButton.MouseButton1Down:connect(function()
- script.Parent.MouseClick:play()
- tween1in(script.Parent.Frame.Buttons.RulesButton)
- tween1down(script.Parent.Frame.Buttons) tween2down(script.Parent.Frame.Rules)
- script.Parent.Frame.Rules.BackButton.MouseEnter:connect(function()
- tween1out(script.Parent.Frame.Rules.BackButton)
- script.Parent.Frame.Rules.BackButton.MouseLeave:connect(function()
- tween1in(script.Parent.Frame.Rules.BackButton)
- end)
- end)
- returnmenu(script.Parent.Frame.Rules.BackButton, script.Parent.Frame.Rules, script.Parent.Frame.Buttons)
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement