Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local animationSpeedShow = .5
- local animationSpeedHide = .5
- local positionShow = UDim2.new(0.1, 0, 0, 0)
- local positionHide = UDim2.new(0.1, 0, -0.2, 0)
- local player = game.Players.LocalPlayer
- local playerGui = player.PlayerGui
- local dialogGui = playerGui.DialogGui
- local dialogFrame = playerGui.DialogGui.DialogFrame
- local showDialog = game.ReplicatedStorage.ShowDialog
- playerGui:SetTopbarTransparency(0)
- local function onShowDialog(thumbnail, text, duration)
- local thumbnailPicture = dialogFrame:FindFirstChild(thumbnail)
- thumbnailPicture.Visible = true
- dialogFrame.TextLabel.Text = text
- dialogFrame:TweenPosition(positionShow, Enum.EasingDirection.Out, Enum.EasingStyle.Quint, animationSpeedShow)
- wait(duration)
- dialogFrame:TweenPosition(positionHide, Enum.EasingDirection.Out, Enum.EasingStyle.Quint, animationSpeedHide)
- wait(animationSpeedHide)
- thumbnailPicture.Visible = false
- end
- showDialog.OnClientEvent:connect(onShowDialog)
Advertisement
Add Comment
Please, Sign In to add comment