Skip to content

Instantly share code, notes, and snippets.

@spotco
spotco / time.php
Created December 9, 2025 23:44
time.php
<?php
header('Content-Type: application/json; charset=utf-8');
// === Configuration (exact match to Ruby) ===
$time_offset = -8 * 3600; // -8 hours → midnight PST
$debug_time_offset = 0; // in seconds (DEBUG_DAYS * 24 * 3600 to debug offset days)
$day_of_week_offset = -3;
$month_offset = 10;
$year_offset = 2019;
@spotco
spotco / time.rb
Created December 9, 2025 23:43
time.rb
$debug_time_offset = (0).weeks + (0).days + (0).seconds
$time_offset = (-8).hours # Midnight PST (-8:00 UTC)
def time()
return Time.now.utc + $time_offset + $debug_time_offset
end
def get_day_id
return ((time().beginning_of_day - ("2017-6-23".to_time(:utc) + $time_offset)) / 86400).to_i
end
@spotco
spotco / sky_and_lighting_to_lua.lua
Last active December 3, 2022 18:14
sky_and_lighting_to_lua.lua
local sky = game.Selection:Get()[1]
assert(sky.ClassName == "Sky")
local msg = string.format([[
sky.SkyboxBk = "%s"
sky.SkyboxDn = "%s"
sky.SkyboxFt = "%s"
sky.SkyboxLf = "%s"
sky.SkyboxRt = "%s"
sky.SkyboxUp = "%s"
@spotco
spotco / accessory_to_lua.lua
Last active December 2, 2022 01:30
accessory_to_lua.lua
local accessory = game.Selection:Get()[1]
while accessory.ClassName ~= "Accessory" do
accessory = accessory.Parent
end
local function fill_list_of_direct_children_of_classname(obj,type,list)
for _,child in pairs(obj:GetChildren()) do
if child.ClassName == type then
list[#list+1] = child
end
@spotco
spotco / convert_m3u8.py
Created August 20, 2022 06:01
convert_m3u9.py
import sys
import os
import re
#OLD:
#/storage/3161-6236/
#NEW:
#/storage/3935-3838/
@spotco
spotco / MenuTemplate.lua
Last active August 7, 2022 23:17
MenuTemplate.lua
local SPUtil = require(game.ReplicatedStorage.Shared.SPUtil)
local SPDict = require(game.ReplicatedStorage.Shared.SPDict)
local SPList = require(game.ReplicatedStorage.Shared.SPList)
local SPUISystem = require(game.ReplicatedStorage.Shared.SPUISystem)
local MenuBase = require(game.ReplicatedStorage.Menu.MenuBase)
local SPUIChild = require(game.ReplicatedStorage.Shared.SPUIChild)
local SPUIChildButton = require(game.ReplicatedStorage.Menu.SPUIChildButton)
local DebugOut = require(game.ReplicatedStorage.Shared.DebugOut)
local SFXManager = require(game.ReplicatedStorage.Local.SFXManager)
local SPRemoteEvent = require(game.ReplicatedStorage.Shared.SPRemoteEvent)
@spotco
spotco / set_transparent_collision_group.lua
Created February 27, 2021 04:04
set_transparent_collision_group.lua
local function r_itr(cur)
for _,child in pairs(cur:GetChildren()) do
r_itr(child)
end
if cur:IsA("BasePart") then
if cur.Transparency >= 0.95 or cur.CanCollide == false then
cur.CollisionGroupId = 1
end
end
end
@spotco
spotco / InputUtil.lua
Created September 17, 2020 00:22
InputUtil main Robeats
local SPUtil = require(game.ReplicatedStorage.Shared.SPUtil)
local SPDict = require(game.ReplicatedStorage.Shared.SPDict)
local SPList = require(game.ReplicatedStorage.Shared.SPList)
local SPVector = require(game.ReplicatedStorage.Shared.SPVector)
local InputUtil = {}
InputUtil.KEY_TRACK1 = 0
InputUtil.KEY_TRACK2 = 1
InputUtil.KEY_TRACK3 = 2
@spotco
spotco / playlist_m3u8_copy.py
Created June 7, 2020 04:04
playlist m3u8 copy
import os
import io
import subprocess
from os import path
list = io.open("betty.m3u8", mode="r", encoding="utf-8").read().split("\n")
for itr in list:
if len(itr) == 0:
continue
source_path = itr.replace("/storage/3734-3234/","/Volumes/NO NAME/")
@spotco
spotco / robeats.net.js
Created January 18, 2020 08:14
robeats.net.js
//forever start redirect.js
var http = require('http');
http.createServer(function (req, res) {
res.writeHead(301, { "Location": "https://www.roblox.com/games/698448212/UPDATE-Club-RoBeats-MMO-Rhythm-Game" });
res.end();
}).listen(80);