Skip to content

Instantly share code, notes, and snippets.

View mvyasu's full-sized avatar
😪
Tired

Yasu Yoshida mvyasu

😪
Tired
View GitHub Profile
@mvyasu
mvyasu / Typewriter.lua
Created November 19, 2022 08:53
A simple typewriter example that allows for the previously set text to be overwritten without any problems.
local textLabel = script.Parent
local lastUpdateTextThread = nil
local function updateText(newText: string)
if lastUpdateTextThread then
task.cancel(lastUpdateTextThread)
lastUpdateTextThread = nil
end
lastUpdateTextThread = task.spawn(function()
@mvyasu
mvyasu / rawTween.lua
Last active July 11, 2023 02:15
Runs a tween inside a loop that can be used alongside the task library
local function rawTween(tweenInfo: TweenInfo, tweenCallback: (tweenAlpha: number) -> nil)
local tweenEasingStyle = tweenInfo.EasingStyle
local tweenEasingDirection = tweenInfo.EasingDirection
local tweenRepeatCount = tweenInfo.RepeatCount
local tweenIndefinitely = tweenRepeatCount<=-1
local tweenDelay = tweenInfo.DelayTime
local tweenDuration = tweenDelay + tweenInfo.Time
local tweenReverses = tweenInfo.Reverses
local MATERIAL_DEMO_SIZE = 4
local MATERIAL_DEMO_SPACING = 1
local MATERIAL_DEMO_SHAPE = Enum.PartType.Block
local MATERIAL_DEMO_COLOR = Color3.fromRGB(255, 255, 255)
local MATERIAL_DEMO_OFFSET = Vector3.yAxis * MATERIAL_DEMO_SIZE/2
local USE_COLUMNS = true
local MATERIALS_PER_ROW = 12
local createdMaterialDemos = {} do
@mvyasu
mvyasu / createWireChainWith.lua
Last active July 5, 2025 15:26
chains together different wireable objects with wires in an easy to understand manner
--!strict
type AudioModifier = AudioEcho | AudioFader | AudioChorus | AudioReverb | AudioFlanger | AudioEqualizer | AudioCompressor | AudioDistortion | AudioPitchShifter
type AudioProcessor = AudioAnalyzer | AudioListener
type AudioOutput = AudioEmitter | AudioDeviceOutput
type AudioInput = AudioDeviceInput | AudioPlayer
export type Wireable = AudioModifier | AudioProcessor | AudioOutput | AudioInput
local function createWire(source: Wireable, target: Wireable, sourceName: string, targetName: string, parent: Instance): Wire
@mvyasu
mvyasu / contextualStudioTheme.lua
Last active July 5, 2025 15:21
A variant of my studio theme provider that uses a contextual
--!strict
local Studio = settings().Studio
local Packages = script.Parent.Parent.Packages
local Fusion = require(Packages.Fusion)
local Contextual = Fusion.Contextual
local Computed = Fusion.Computed
local Value = Fusion.Value
@mvyasu
mvyasu / applyLighting.luau
Created May 17, 2026 01:44
an applyLighting function that can handle tweens and complex setups
const TweenService = game:GetService("TweenService")
const Lighting = game:GetService("Lighting")
const TWEENABLE_TYPES: { [string]: boolean } = {
number = true,
Color3 = true,
Vector2 = true,
Vector3 = true,
CFrame = true,
UDim = true,