Skip to content

Instantly share code, notes, and snippets.

{"type":"changebackground","background":"bg_moonhill"},
{"type":"playBGM","bgm":"epic"},
{"type":"dialogue","text":"Exhausted and out of breath, I make it to the top.","xpos":0,"ypos":0},
{"type":"dialogue","text":"Ahead, I saw two figures standing across each other in the moonlight.","xpos":0,"ypos":0},
{"type":"showcharacter","character":"Mana","image":"char_mana_festival_sad","xpos":300,"xscale":1},
{"type":"dialogue","text":"On one side was Mana. She on one knee, looking like she was in pain.","xpos":0,"ypos":0},
{"type":"dialogue","character":"Mana","text":"...J-just who are you, exactly?","xpos":30,"ypos":77},
@spotco
spotco / osu_to_lua.py
Created December 10, 2016 06:49
osu_to_lua.py
import sys
import re
MODE_GENERAL, MODE_TIMINGPOINTS, MODE_HITOBJECTS = range(3)
current_mode = None
dict_out = {
"AudioFilename" : "Unknown",
"AudioLeadIn" : 0,
"HitObjects" : []
Gossip and chatter echo through the halls as I make my way back to class.
The noise around me begins to blend together to a continuous background hum.
I think I'm feeling under the weather.
As I take another step, my vision begins to blur.
The world around me shifts as I regain my balance. The thoughts in my head are spinning.
I... should really sit down somewhere.
Making my way down the hall, I reach my home classroom and open the door.
A sharp pain runs through my head as the colors around me distort.
The clear skies outside have suddenly turned into dark, ominous clouds.
@spotco
spotco / SparkleStarEffectObject.lua
Created December 29, 2016 09:30
SparkleStarEffectObject.lua
local ConfigAnimEffect = require(game.ReplicatedStorage.Effects.ConfigAnimEffect)
local SPUtil = require(game.ReplicatedStorage.Shared.SPUtil)
local FlashEvery = require(game.ReplicatedStorage.Shared.FlashEvery)
local SparkleStarEffectObject = {}
SparkleStarEffectObject.Type = "SparkleStarEffectObject"
function SparkleStarEffectObject:add_sparkle_at(_game, pos)
_game._effects:add_effect(
ConfigAnimEffect:new(SparkleStarEffectObject:new(_game)))
@spotco
spotco / SetStuffAnchored.lua
Created January 12, 2017 07:40
SetStuffAnchored.lua
for _,child in pairs(game.Workspace.Environment.StreetLamps:GetChildren()) do
local LampMesh = child:FindFirstChild("LampMesh")
if LampMesh then
for _,child in pairs(LampMesh:GetChildren()) do
child.Anchored = true
end
end
end
@spotco
spotco / gist:d5bc636ffd4ac54f03735d2354d81c23
Created January 12, 2017 08:23
apply_mesh_texture_recursive.lua
function recurse(itr)
for _,child in pairs(itr:GetChildren()) do
if child.Name == "TestBuilding1" then
child.Building1Mesh.TextureID = "rbxgameasset://Images/building1_diffuse"
end
if child.Name == "TestBuilding2" then
child.Building2Mesh.TextureID = "rbxgameasset://Images/building1_diffuse"
end
if child.Name == "TestBuilding3" then
child.Building3Mesh.TextureID = "rbxgameasset://Images/building3_diffuse"
@spotco
spotco / Test.lua
Created January 17, 2017 19:54
Test.lua
local TimingPoints = {
[1] = { Time = 1195; BeatLength = 500; };
[2] = { Time = 8570; BeatLength = 500; };
[3] = { Time = 9070; BeatLength = 500; };
[4] = { Time = 10570; BeatLength = 500; };
[5] = { Time = 11070; BeatLength = 500; };
[6] = { Time = 12570; BeatLength = 500; };
[7] = { Time = 14320; BeatLength = 500; };
[8] = { Time = 15070; BeatLength = 500; };
[9] = { Time = 15320; BeatLength = 500; };
@spotco
spotco / DisableHumanoidPhysicsLocal.lua
Created January 27, 2017 20:21
DisableHumanoidPhysicsLocal
for _,child in pairs(game.Workspace.GameEnvironment.ReferencePlayers:GetChildren()) do
local humanoid_child = child:FindFirstChild("Humanoid")
if humanoid_child ~= nil then
for _,enum in pairs(Enum.HumanoidStateType:GetEnumItems()) do
if enum ~= Enum.HumanoidStateType.None then
humanoid_child:SetStateEnabled(enum, false)
end
end
end
end
@spotco
spotco / EnvSetCanCollide.lua
Last active March 28, 2017 07:38
EnvSetCanCollide.lua
function r_set_collide(itr)
if itr.Name == "Ground" then
return
end
if itr.ClassName == "Part" or itr.ClassName == "UnionOperation" or itr.ClassName == "MeshPart" then
itr.CanCollide = false
itr.Anchored = true
end
@spotco
spotco / CreateAnchors.lua
Created February 21, 2017 01:26
CreateAnchors.lua
local center = game.Workspace.GameEnvironment.GameEnvironmentCenter.Position
local magnitude = (Vector3.new(275.532, 397.398, -216.867) - Vector3.new(214.636, 397.398, -224.061)).magnitude + 1.5
local y_offset = 1.91
for i=0,85 do
local theta = (i / 25.0) * math.pi * 2
local x = math.sin(theta)
local y = math.cos(theta)
local itr = Instance.new("Part")