window.InitUserScripts = function()
{
var player = GetPlayer();
var object = player.object;
var once = player.once;
var addToTimeline = player.addToTimeline;
var setVar = player.SetVar;
var getVar = player.GetVar;
var update = player.update;
var pointerX = player.pointerX;
var pointerY = player.pointerY;
var showPointer = player.showPointer;
var hidePointer = player.hidePointer;
var slideWidth = player.slideWidth;
var slideHeight = player.slideHeight;
var getKeyDown = player.getKeyDown;
var keydown = player.keydown;
var keyup = player.keyup;
window.Script1 = function()
{
  // Get the current date
var currentDate = new Date();

// Define an array of month names
var monthNames = ["January", "February", "March", "April", "May", "June", 
                  "July", "August", "September", "October", "November", "December"];

// Extract the day, month, and year
var day = currentDate.getDate();
var month = monthNames[currentDate.getMonth()];
var year = currentDate.getFullYear();

// Format the date as "Day Month Year"
var formattedDate = day + " " + month + " " + year;

// Display the formatted date in Storyline 360
var player = GetPlayer();
player.SetVar("TodayDate", formattedDate);
}

window.Script2 = function()
{
  let player = GetPlayer();
let myName = lmsAPI.GetStudentName();
let array = myName.split(',');
let newName = array[1] + ' ' + array[0];
                  
player.SetVar("lmsName", newName);
}

};
