Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- wait()
- -- Begin Variable Definition
- local gui = script.Parent
- local buttons = script.Parent.buttonFrame
- local launch = buttons.launchButton
- local about = buttons.aboutButton
- local rules = buttons.rulesButton
- local exitButton = buttons.exitButton
- local aboutFrame = gui.aboutWindow
- local rulesFrame = gui.rulesWindow
- local title = gui.title
- local titleGlow = gui.titleGlow
- local subtitle = gui.subtitle
- -- End Variable Definition
- for i = 1,.4,-.075 do
- gui.instructions.TextTransparency = i
- wait()
- end
- print("Intro Complete!")
- local mouse = game.Players.LocalPlayer:GetMouse()
- mouse.KeyDown:connect(function(key)
- if key:byte() == 13 then
- wait()
- for i = .4,1,.1 do
- gui.instructions.TextTransparency = i
- wait()
- end
- wait()
- title:TweenPosition(UDim2.new(0, 0, .3, 0), "Out", "Quad", .3, false)
- titleGlow:TweenPosition(UDim2.new(0, 0, .3, 0), "Out", "Quad", .3, false)
- wait(.5)
- subtitle:TweenPosition(UDim2.new(.05,0,.4,0), "Out", "Quad", .3, false)
- wait(1)
- buttons:TweenPosition(UDim2.new(.05,0,.6,0), "Out", "Quad", .3, false)
- end
- end)
- function handleEnterGui(target)
- local debounce = false
- if not debounce then
- gui.beepEnter:play()
- debounce = true
- for i=.4,0,-.1 do
- target.buttonText.TextTransparency = i
- target.icon.ImageTransparency = i
- wait()
- end
- debounce = false
- end
- end
- function handleLeaveGui(target)
- local debounce = false
- if not debounce then
- debounce = true
- for i=0,.4,.1 do
- target.buttonText.TextTransparency = i
- target.icon.ImageTransparency = i
- wait()
- end
- debounce = false
- end
- end
- function frameSlideIn(target)
- local debounce = false
- if not debounce then
- debounce = true
- target:TweenPosition(UDim2.new(.4, 0, .2, 0), "Out", "Quad", .25, false)
- wait(.25)
- debounce = false
- end
- end
- function frameSlideOut(target)
- local debounce = false
- if not debounce then
- debounce = true
- target:TweenPosition(UDim2.new(1, 0, .2, 0), "Out", "Quad", .25, false)
- wait(.25)
- debounce = false
- end
- end
- launch.MouseEnter:connect(function()
- handleEnterGui(launch)
- end)
- rules.MouseEnter:connect(function()
- handleEnterGui(rules)
- end)
- about.MouseEnter:connect(function()
- handleEnterGui(about)
- end)
- exitButton.MouseEnter:connect(function()
- handleEnterGui(exitButton)
- end)
- --MOUSE LEAVE FUNCTIONS
- launch.MouseLeave:connect(function()
- handleLeaveGui(launch)
- end)
- rules.MouseLeave:connect(function()
- handleLeaveGui(rules)
- end)
- about.MouseLeave:connect(function()
- handleLeaveGui(about)
- end)
- exitButton.MouseLeave:connect(function()
- handleLeaveGui(exitButton)
- end)
- --MOUSE CLICK FUNCTIONS
- launch.MouseButton1Down:connect(function()
- gui:destroy()
- end)
- local aboutOpen = false
- local rulesOpen = false
- about.MouseButton1Down:connect(function()
- if aboutOpen then
- aboutOpen = false
- frameSlideOut(aboutFrame)
- else
- aboutOpen = true
- frameSlideIn(aboutFrame)
- end
- end)
- rules.MouseButton1Down:connect(function()
- if rulesOpen then
- rulesOpen = false
- frameSlideOut(rulesFrame)
- else
- rulesOpen = true
- frameSlideIn(rulesFrame)
- end
- end)
- exitButton.MouseButton1Down:connect(function()
- game.Players.LocalPlayer:Kick()
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement