Antro | Aesthetic Intros for your game

An amazing contribution by far! I’m glad to see people constantly bring new and exciting resources for users to use in their games!

However, I personally think you could turn this into quite the plugin! Should definitely consider doing that!

1 Like

This isn’t working for me.
Capture
I copied and pasted the local script but nothing appears. It just looks like nothing happened.

I couldn’t bear to see the indentation of the code, so I formatted it for you. Here is the beautified version:

Beautified Code
local Aesthetic_Intro = {}
local TweenService = game:GetService("TweenService")
local Settings = script.Configuration

function Aesthetic_Intro.StartIntro(Player)
    local Style = Settings.Style.Value
    local TextColor = Settings.TextColor.Value
    local BackgroundColor = Settings.BackgroundColor.Value
    local LoadingText = Settings.LoadingText.Value
    local WelcomeText = Settings.WelcomeText.Value

    if Style == "Classic" then
        local GUI = Instance.new("ScreenGui", Player.PlayerGui)
        local Frame = Instance.new("Frame", GUI)

        Frame.Size = UDim2.new(1, 0, 1, 0)
        GUI.IgnoreGuiInset = true
        Frame.BackgroundColor3 = BackgroundColor
        Frame.BorderSizePixel = 0
        GUI.ResetOnSpawn = false
        Frame.Position = UDim2.new(0, 0, 1, 0)

        local Game_Name_Text = Instance.new("TextLabel", Frame)

        Game_Name_Text.BackgroundTransparency = 1
        Game_Name_Text.Text = game.Name
        Game_Name_Text.Position = UDim2.new(0.266, 0, 0.104, 0)
        Game_Name_Text.Size = UDim2.new(0.468, 0, 0.232, 0)
        Game_Name_Text.Font = Enum.Font.SourceSansLight
        Game_Name_Text.TextColor3 = Settings.TextColor.Value
        Game_Name_Text.TextScaled = true
        Game_Name_Text.TextTransparency = 1

        wait(2)

        Frame:TweenPosition(UDim2.new(0, 0, 0, 0), "Out", "Sine", 1)

        wait(1)

        local Hedef = {}

        local Sure = TweenInfo.new(0.5)
        local Tween = TweenService:Create(Game_Name_Text, Sure, Hedef)

        Hedef.TextTransparency = 0
        Tween:Play()

        wait(2)

        local Game_Name_Text2 = Instance.new("TextLabel", Frame)
        local Game_Name_Text3 = Instance.new("TextLabel", Frame)

        Game_Name_Text2.BackgroundTransparency = 1
        Game_Name_Text2.Text = Settings.LoadingText.Value
        Game_Name_Text2.Position = UDim2.new(0.266, 0, 0.383, 0)
        Game_Name_Text2.Size = UDim2.new(0.468, 0, 0.064, 0)
        Game_Name_Text2.Font = Enum.Font.SourceSansLight
        Game_Name_Text2.TextColor3 = Settings.TextColor.Value
        Game_Name_Text2.TextScaled = true
        Game_Name_Text2.TextTransparency = 1

        Game_Name_Text3.BackgroundTransparency = 1
        Game_Name_Text3.BackgroundColor3 = Settings.BackgroundColor.Value
        Game_Name_Text3.BorderSizePixel = 0
        Game_Name_Text3.Text = Settings.WelcomeText.Value
        Game_Name_Text3.Position = UDim2.new(0.266, 0, 0.383, 0)
        Game_Name_Text3.Size = UDim2.new(0.468, 0, 0.064, 0)
        Game_Name_Text3.Font = Enum.Font.SourceSansLight
        Game_Name_Text3.TextColor3 = Settings.TextColor.Value
        Game_Name_Text3.TextScaled = true
        Game_Name_Text3.TextTransparency = 1

        local Hedef2 = {}
        Hedef2.TextTransparency = 0

        local Sure2 = TweenInfo.new(0.5)
        local Tween2 = TweenService:Create(Game_Name_Text2, Sure2, Hedef2)

        Tween2:Play()

        wait(4)

        local Hedef3 = {}
        Hedef3.TextTransparency = 0
        Hedef3.BackgroundTransparency = 0
        local Sure3 = TweenInfo.new(0.5)

        local Tween3 = TweenService:Create(Game_Name_Text3, Sure3, Hedef3)

        Tween3:Play()

        local Hedef4 = {}
        Hedef4.TextTransparency = 1

        local Sure4 = TweenInfo.new(0.5)
        local Tween4 = TweenService:Create(Game_Name_Text2, Sure4, Hedef4)

        Tween4:Play()

        wait(2)
        Frame:TweenPosition(UDim2.new(0, 0, -1, 0), "In", "Sine", 1)
        wait(1)
        GUI:Destroy()
    else
        warn(Style .. " Is not a valid style.")
    end
end

return Aesthetic_Intro

Also, you might wanna look into renaming your variables because ‘Hedef4’ and ‘Sure4’ are not that self-explanatory

4 Likes

honestly i seriously think you should make a plugin with buttons (like intro creator). it would be much easier to use and newer newbies would use it to then.
here is the plugin by @ARTFVL Intro Creator Plugin

1 Like

That Sure and Hedef are called, Time and Target in Turkish lol.
Forgot to translate it in the script.

Do you have any errors or warnings at the output?

Thank you for your feedback, I want to turn this into a plugin but I don’t know how can I code.

It’s alright I guess,

There are a few bad practices that I want to address.


First, using instance.new to set the parent is not too great for performance.

Set the parent last

local thing = Instance.new("Part")
-- modify properties
thing.Parent = workspace

Second, everything to do with variables.

  1. Variable names are wonky. You have variable names like “Sure” to save tweenInfo, it would be much better suited with a variable like “frameTweenInfo”

  2. Creating variables when you don’t need to.

local Hedef = {}
Hedef.TextTransparency = 0
local Sure = TweenInfo.new(0.5)
local Tween = TweenService:Create(Game_Name_Text, Sure, Hedef)
Tween:Play()

-- Can be condensed down to 
local tweenInfo = TweenInfo.new(.5)
TweenService:Create(Game_Name_Text, tweenInfo, {TextTransparency = 0}):Play()

Also you create new TweenInfo’s instead of reusing the ones you have already created.
It’s just adding more clutter to your code!


Third, creating all of this UI is supper inefficient compared to just having a UI in replicated storage and cloning it. Then you can use TweenService on those parts.

If you need to hide elements of the UI, you can simply use Visible property of GUI elements to keep them hidden.


Fourth, when creating UI, make sure to make use of Anchor Point
It will prevent you from creating messy UDim2 values like these.

Game_Name_Text.Position = UDim2.new(0.266, 0, 0.104, 0)
Game_Name_Text.Size = UDim2.new(0.468, 0, 0.232, 0)

Finally, regarding module scripts. No need for a variable, when you can return the function directly

-- Somewhat what your module looks like
local module = {} 
function module.action(Player)

end
return module

--------
-- different method
return function(player) 
  
end

You can call it like this

local intro = require(pathToModuleScript)
intro(game.Players.LocalPlayer)

2 Likes

Thank you for your feedback, I’ll work on that.

That’s really nice! Perhaps use Marketplace service to get the place’s name etc.?

It’s simple. Inside the local script, instead of this line: image

Type: image

Or simply copy & paste this code:

local Module = require(game.ReplicatedStorage["Aesthetic Intro"])

local Player = game.Players.LocalPlayer

Module.StartIntro(Player)

script:Destroy()

Reply back if it works.

:memo: - Harmony

1 Like

Oh, I don’t need this anymore, but thanks though!

The example video is private. Could you update it please?

ok but as an user, i don’t like intros in general, just let me play

I found the video and made it public.

Why??? This looked like it had a lot of potential, especially if you made it into a plugin with increased customization.

  1. Code is written in a really bad way. And I’m kinda lazy to fix it.
  2. That requires a coding even it’s really tiny.
  3. Lost my motivation

Well, I still work on some open source projects and i’ll make a plugin for this.

nice but can u include a video example for us next time?

I already did that.

oh well then thanks the test was just to small

1 Like