Advertisement
Guest User

Untitled

a guest
Sep 21st, 2014
209
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 5.16 KB | None | 0 0
  1. print("Citadel Engine 1.0 loaded")
  2. -- SCRIPTED BY BLUEFREDY --
  3. ---------------------------
  4. player = game.Players.LocalPlayer
  5. char = player.Character
  6. group = 1155390
  7. allies = {}
  8. defenders = "Bright orange"
  9. raiders = "Medium blue"
  10.  
  11. function checkallie(ally)
  12.     for a = 1, #allies do
  13.         if player:IsInGroup(allies[a]) then
  14.             return true
  15.         else
  16.             return false
  17.         end
  18.     end
  19. end
  20.  
  21. function tween1out(TextButton)
  22.         TextButton:TweenPosition(UDim2.new(0, 30, TextButton.Position.Y.Scale, TextButton.Position.Y.Offset), "Out", "Sine", 0.25, true)
  23.         TextButton.TextColor3 = Color3.new(255/255, 175/255, 0/255)
  24. end
  25. function tween1in(TextButton)
  26.         TextButton:TweenPosition(UDim2.new(0, 15, TextButton.Position.Y.Scale, TextButton.Position.Y.Offset), "Out", "Sine", 0.25, true)
  27.         TextButton.TextColor3 = Color3.new(255/255, 255/255, 255/255)
  28. end
  29. function tween1down(Frame)
  30.     Frame:TweenPosition(UDim2.new(-2.5, 0, Frame.Position.Y.Scale, Frame.Position.Y.Offset), "Out", "Sine", 0.25, true)
  31.     function tween2down(Frame2)
  32.         Frame2:TweenPosition(UDim2.new(0, 0, Frame.Position.Y.Scale, Frame.Position.Y.Offset), "Out", "Sine", 0.25, true)
  33.     end
  34. end
  35. function returnmenu(Button, Frame2, Frame)
  36.     Button.MouseButton1Down:connect(function()
  37.         script.Parent.MouseClick:play()
  38.         Frame2:TweenPosition(UDim2.new(3.5, 0, Frame2.Position.Y.Scale, Frame2.Position.Y.Offset), "Out", "Sine", 0.25, true)
  39.         Frame:TweenPosition(UDim2.new(0, 0, Frame.Position.Y.Scale, Frame.Position.Y.Offset), "Out", "Sine", 0.25, true)
  40.     end)
  41. end
  42.  
  43. function notification()
  44.     note = script.Parent.Frame.Notifation
  45.     note:TweenPosition(UDim2.new(1, 10, note.Position.Y.Scale, note.Position.Y.Offset), "Out", "Sine", 0.125, true)
  46.     wait(1)
  47.     note:TweenPosition(UDim2.new(3.5, 0, note.Position.Y.Scale, note.Position.Y.Offset), "Out", "Sine", 0.125, true)
  48. end
  49.  
  50. function decideteam()
  51.     local lock = false
  52.     defend = script.Parent.Frame.Teams.FendButton
  53.     raid = script.Parent.Frame.Teams.RaidButton
  54.     note = script.Parent.Frame.Notifation
  55.    
  56.     defend.MouseButton1Down:connect(function()
  57.         if lock == false then
  58.             lock = true
  59.             if player:IsInGroup(group) or checkallie == true then
  60.                 script.Parent.MouseClick:play()
  61.                 --
  62.                 player.TeamColor = BrickColor.new(defenders)
  63.             else
  64.                 script.Parent.Error:play()
  65.                 note.Frame.TextLabel2.Text = string.upper("You're not in Citadel Pact or an Allie!")
  66.                 notification()
  67.                 --
  68.             wait(0.5)
  69.             --
  70.             end
  71.             lock = false
  72.         end
  73.     end)
  74.     raid.MouseButton1Down:connect(function()
  75.         if lock == false then
  76.             lock = true
  77.             script.Parent.MouseClick:play()
  78.             --
  79.             player.TeamColor = BrickColor.new(raiders)
  80.         end
  81.         wait(0.5)
  82.         --
  83.         lock = false
  84.     end)
  85. end
  86.  
  87. script.Parent.Frame.Buttons.JoinButton.MouseEnter:connect(function()
  88.     tween1out(script.Parent.Frame.Buttons.JoinButton)
  89.     script.Parent.Frame.Buttons.JoinButton.MouseLeave:connect(function()
  90.         tween1in(script.Parent.Frame.Buttons.JoinButton)
  91.     end)
  92. end)
  93. script.Parent.Frame.Buttons.OptionsButton.MouseEnter:connect(function()
  94.     tween1out(script.Parent.Frame.Buttons.OptionsButton)
  95.     script.Parent.Frame.Buttons.OptionsButton.MouseLeave:connect(function()
  96.         tween1in(script.Parent.Frame.Buttons.OptionsButton)
  97.     end)
  98. end)
  99. script.Parent.Frame.Buttons.RulesButton.MouseEnter:connect(function()
  100.     tween1out(script.Parent.Frame.Buttons.RulesButton)
  101.     script.Parent.Frame.Buttons.RulesButton.MouseLeave:connect(function()
  102.         tween1in(script.Parent.Frame.Buttons.RulesButton)
  103.     end)
  104. end)
  105. script.Parent.Frame.Buttons.StatsButton.MouseEnter:connect(function()
  106.     tween1out(script.Parent.Frame.Buttons.StatsButton)
  107.     script.Parent.Frame.Buttons.StatsButton.MouseLeave:connect(function()
  108.         tween1in(script.Parent.Frame.Buttons.StatsButton)
  109.     end)
  110. end)
  111.  
  112. script.Parent.Frame.Buttons.JoinButton.MouseButton1Down:connect(function()
  113.     script.Parent.MouseClick:play()
  114.         tween1in(script.Parent.Frame.Buttons.JoinButton)
  115.         tween1down(script.Parent.Frame.Buttons) tween2down(script.Parent.Frame.Teams)
  116.         script.Parent.Frame.Teams.JoinButton.MouseEnter:connect(function()
  117.             tween1out(script.Parent.Frame.Teams.JoinButton)
  118.             script.Parent.Frame.Teams.JoinButton.MouseLeave:connect(function()
  119.                 tween1in(script.Parent.Frame.Teams.JoinButton)
  120.             end)
  121.         end)
  122.         script.Parent.Frame.Teams.BackButton.MouseEnter:connect(function()
  123.             tween1out(script.Parent.Frame.Teams.BackButton)
  124.             script.Parent.Frame.Teams.BackButton.MouseLeave:connect(function()
  125.                 tween1in(script.Parent.Frame.Teams.BackButton)
  126.             end)
  127.         end)
  128.     decideteam()
  129.     returnmenu(script.Parent.Frame.Teams.BackButton, script.Parent.Frame.Teams, script.Parent.Frame.Buttons)
  130. end)
  131.  
  132. script.Parent.Frame.Buttons.RulesButton.MouseButton1Down:connect(function()
  133.     script.Parent.MouseClick:play()
  134.         tween1in(script.Parent.Frame.Buttons.RulesButton)
  135.         tween1down(script.Parent.Frame.Buttons) tween2down(script.Parent.Frame.Rules)
  136.         script.Parent.Frame.Rules.BackButton.MouseEnter:connect(function()
  137.             tween1out(script.Parent.Frame.Rules.BackButton)
  138.             script.Parent.Frame.Rules.BackButton.MouseLeave:connect(function()
  139.                 tween1in(script.Parent.Frame.Rules.BackButton)
  140.             end)
  141.         end)
  142.     returnmenu(script.Parent.Frame.Rules.BackButton, script.Parent.Frame.Rules, script.Parent.Frame.Buttons)
  143. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement