Converted Player's LOSScript to C# from JS