Skip to content

Instantly share code, notes, and snippets.

@spotco
spotco / gist:3d42358cf1e4bc9e0a865d3a589d1b00
Created June 28, 2018 03:42
#mapping-criteria copypasta
[1] #mapping-criteria The notes in your map must be "synced" to the music.
[2] #mapping-criteria The timing of your map (BPM, timing points and time signature) must correctly reflect the song.
[3] #mapping-criteria Every note in your map should correspond with an important and distinct sound in the music.
[4] #mapping-criteria Emphasized sounds in the music should be reflected with emphasized notes in your map.
[5] #mapping-criteria Differences of intensity in the song should be reflected in your map.
[6] #mapping-criteria Your map should be consistent in which patterns it uses to match which sounds in the music.
[7] #mapping-criteria When relevant, the placement of notes within sections of your map should have a visible "direction". This should match the changes of "pitch" in the music for that section.
@spotco
spotco / robeats_songinfo_dump.py
Created March 3, 2018 05:22
robeats_songinfo_dump.py
import sys
import os
import re
def extract_str_value(line):
matches = re.search(r'".+"', line)
if matches:
return matches.group()[1:-1]
matches = re.search(r'\[\[.+\]\]', line)
if matches:
@spotco
spotco / capslock.ahk
Created February 21, 2018 03:21
capslock.ahk
CapsLock::Ctrl
@spotco
spotco / hardcode_camera.lua
Created January 11, 2018 07:33
hardcode_camera.lua
local cframe = game.Workspace.CurrentCamera.CFrame
local x, y, z, R00, R01, R02, R10, R11, R12, R20, R21, R22 = cframe:components()
print(string.format("local camera_cframe = {%.5f, %.5f, %.5f, %.5f, %.5f, %.5f, %.5f, %.5f, %.5f, %.5f, %.5f, %.5f};",
x,y,z,
R00, R01, R02,
R10, R11, R12,
R20, R21, R22
))
@spotco
spotco / make_spdecal.lua
Last active June 25, 2021 05:42
make_spdecal.lua
local function make_spdecal(cur, texture)
local string_value = cur:FindFirstChild("SPDecal")
if string_value == nil then
string_value = Instance.new("StringValue")
end
string_value.Value = texture
string_value.Name = "SPDecal"
string_value.Parent = cur
end
@spotco
spotco / CreateWebNPCAnchors.lua
Last active October 15, 2021 18:00
CreateWebNPCAnchors.lua
str = "local WebNPCAnchors = {}; WebNPCAnchors.Anchors = {};" .. "\n"
for k,v in pairs(game.Workspace.WebNPCAnchors:GetChildren()) do
local cframe = v.Humanoid.RootPart.CFrame
local name = v.Name
local x, y, z, R00, R01, R02, R10, R11, R12, R20, R21, R22 = cframe:components()
str = str .. string.format("WebNPCAnchors.Anchors[\"%s\"] = {%.5f, %.5f, %.5f, %.5f, %.5f, %.5f, %.5f, %.5f, %.5f, %.5f, %.5f, %.5f};",
name,
x,y,z,
R00, R01, R02,
R10, R11, R12,
@spotco
spotco / gist:5ffd5a38c0ed20541e629003273eb0b3
Created November 14, 2017 23:49
TransparencyConvert.lua
function r_itr(cur)
pcall(function()
if cur.Transparency == 1 then
cur.Transparency = 0.99
end
end)
for _,child in pairs(cur:GetChildren()) do
r_itr(child)
end
@spotco
spotco / find_texture.lua
Last active August 31, 2017 08:27
find_texture.lua
function r_itr(cur)
pcall(function()
if cur.Texture == "rbxgameasset://Images/WORLD_PARK_flowercircle1-old" then
print(cur:GetFullName())
end
end)
for _,child in pairs(cur:GetChildren()) do
r_itr(child)
@spotco
spotco / .luacheckrc.lua
Created August 4, 2017 05:55
.luacheckrc
-- luacheck: ignore
globals = {
-- global functions
"script",
"warn",
"wait",
"spawn",
"delay",
"tick",
@spotco
spotco / LocalizationTableExample.lua
Created August 3, 2017 22:26
LocalizationTableExample.lua
local LocalizationService = game:GetService("LocalizationService")
local HttpService = game:GetService("HttpService")
local function createLocalizationTable(contents)
local rtv = Instance.new("LocalizationTable")
rtv.DevelopmentLanguage = "en-US"
rtv.Contents = HttpService:JSONEncode(contents)
return rtv
end