FNF Psych Engine Script Creator

Welcome to the FNF Psych Engine Script Creator! This tool helps you create Lua scripts for Friday Night Funkin' Psych Engine mods. Below you'll find a comprehensive list of available functions, variables, and callbacks to use in your scripts.

Available Variables

luaDebugMode
luaDeprecatedWarnings
inChartEditor
curBpm
bpm
scrollSpeed
crochet
stepCrochet
songLength
songName
isStoryMode
difficulty
weekRaw
week
cameraX
cameraY
screenWidth
screenHeight
startedCountdown
seenCutscene
curBeat
curStep
score
misses
ghostMisses
hits
rating
ratingName
inGameOver
mustHitSection
altAnim
gfSection
botPlay

Strum/Receptor Variables

defaultPlayerStrumX0 - defaultPlayerStrumX3
defaultPlayerStrumY0 - defaultPlayerStrumY3
defaultOpponentStrumX0 - defaultOpponentStrumX3
defaultOpponentStrumY0 - defaultOpponentStrumY3
defaultBoyfriendX
defaultBoyfriendY
defaultOpponentX
defaultOpponentY
defaultGirlfriendX
defaultGirlfriendY

Preferences Variables

downscroll
middlescroll
framerate
ghostTapping
hideHud
hideTime
cameraZoomOnBeat
flashingLights
noteOffset
lowQuality

Available Functions

Score/Accuracy Functions

Key Press Functions

Mouse Functions

Other Useful Functions

Camera Functions

Tween Functions

Timer Functions

Sprite Functions

Precache Functions

Callback Functions

These are the main functions you can use in your Lua script to interact with the game:

function onCreate()
function onCreatePost()
function onDestroy()
function onSectionHit()
function onBeatHit()
function onStepHit()
function onUpdate(elapsed)
function onUpdatePost(elapsed)
function onStartCountdown()
function onCountdownStarted()
function onCountdownTick(counter)
function onSongStart()
function onEndSong()
function onGameOver()
function onGameOverConfirm(retry)
function onPause()
function onResume()
function onNextDialogue(line)
function onSkipDialogue(line)
function onSpawnNote(id, data, type, isSustainNote)
function goodNoteHit(id, direction, noteType, isSustainNote)
function opponentNoteHit(id, direction, noteType, isSustainNote)
function noteMissPress(direction)
function noteMiss(id, direction, noteType, isSustainNote)
function onKeyPress(key)
function onKeyRelease(key)
function onGhostTap(key)
function onRecalculateRating()
function onMoveCamera(focus)
function onEvent(name, value1, value2)
function onTweenCompleted(tag)
function onTimerCompleted(tag, loops, loopsLeft)
function onSoundFinished(tag)

Remember to check the Psych Engine documentation for more detailed information on how to use these functions and variables in your scripts. Happy modding!