/* A script that causes stoneheads to rain from the sky! Made by Mallathor, with help from Incoherent_toast Version 1.0 */ //----------------Changable variables----------------// var stoneColor = #bbbbbb //determines the color of the stoneheads var randomizeStoneColor = "false" //determines if stoneheads spawn as a random color var spawnOnClick = "true" //whether or not stonehead spawns when you click var isClickSpawnRandom = "false" //whether or not the click spawn happens at click position var occasionalSpawn = "true" //if stoneheads spawn randomly every now and then var occasionalSpawnChance = 15 //the chance out of 100 that a stonehead is spawned each frame var isChaosUnleashed = "false" //Warning: may lag inferior devices var chaosClearRateIncrease = "true" /*determines whether or not to clear more stoneheads per frame when chaos is active, to prevent the screen from being covered disable to make your screen fill with stones!*/ //----------------Art----------------// var fallArt = ascii o<─< %% # o<─< %% # # o<─< %% # # # o<─< %% # # # # o<─< %% # # # # # o<─< %% # # # # # # o<─< %% # # # # # # # o<─< %% # # # # # # # # o<─< %% # # # # # # # # # o<─< %% # # # # # # # # # # o<─< %% # # # # # # # # # # # o<─< %% # # # # # # # # # # # # o<─< %% # # # # # # # # # # # # # o<─< %% # # # # # # # # # # # # # # o<─< %% # # # # # # # # # # # # # # # o<─< %% # # # # # # # # # # # # # # # # o<─< %% # # # # # # # # # # # # # # # # # o<─< %% # # # # # # # # # # # # # # # # # @#@@ o@#@ %% # # # # # # # # # # # # # # # # # @#@@ o@#@ %% {repeat:2} done! # # # # # # # # # # # # # # # # # o %% # # # # # # # # # # # # # # # # # o %% {repeat:2} Done! # # # # # # # # # # # # # # # # o %% # # # # # # # # # # # # # # # # o %% {repeat:4} Done! # # # # # # # # # # # # # # # o %% # # # # # # # # # # # # # # # o %% # # # # # # # # # # # # # # # o %% # # # # # # # # # # # # # # # o %% {repeat:8} Done! # # # # # # # # # # # # # # o %% # # # # # # # # # # # # # # o %% # # # # # # # # # # # # # # o %% # # # # # # # # # # # # # # o %% # # # # # # # # # # # # # # o %% # # # # # # # # # # # # # # o %% # # # # # # # # # # # # # # o %% # # # # # # # # # # # # # # o %% {repeat:4} Done! # # # # # # # # # # # # # # # o %% # # # # # # # # # # # # # # # o %% # # # # # # # # # # # # # # # o %% # # # # # # # # # # # # # # # o %% {repeat:2} Done! # # # # # # # # # # # # # # # # o %% # # # # # # # # # # # # # # # # o %% {repeat:2} Done! # # # # # # # # # # # # # # # # # o %% # # # # # # # # # # # # # # # # # o %% {repeat:2} Done! # # # # # # # # # # # # # # # # # # o %% # # # # # # # # # # # # # # # # # # o %% {repeat:2} Done! # # # # # # # # # # # # # # # # # # #o %% # # # # # # # # # # # # # # # # # # #o %% {repeat:2} Done! # # # # # # # # # # # # # # # # # # ##o %% # # # # # # # # # # # # # # # # # # ##o %% {repeat:4} Done! # # # # # # # # # # # # # # # # # # ###o %% # # # # # # # # # # # # # # # # # # ###o %% # # # # # # # # # # # # # # # # # # ###o %% # # # # # # # # # # # # # # # # # # ###o %% {repeat:8} Done! # # # # # # # # # # # # # # # # # # ##o %% # # # # # # # # # # # # # # # # # # ##o %% # # # # # # # # # # # # # # # # # # ##o %% # # # # # # # # # # # # # # # # # # ##o %% # # # # # # # # # # # # # # # # # # ##o %% # # # # # # # # # # # # # # # # # # ##o %% # # # # # # # # # # # # # # # # # # ##o %% # # # # # # # # # # # # # # # # # # ##o %% # # # # # # # # # # # # # # # # # # #o asciiend //----------------Functions----------------// func MakeStonehead(stoneX, stoneY) var fallingStone = ui.AddAnim(fallArt) fallingStone.dock = top_left ?stoneX = random fallingStone.x = RandomRange(1,screen.w-1) : fallingStone.x = stoneX ?stoneY = random fallingStone.y = RandomRange(-18,screen.h+18) : fallingStone.y = stoneY -9 fallingStone.Play() fallingStone.loop = false ?randomizeStoneColor = "true" stoneColor = color.Random() fallingStone.color = stoneColor return fallingStone func RandomRange(min, max) ?min >= max return min return min + rng % (max - min + 1) //----------------Everything Else----------------// var stoneList = [] ?stoneList.Count() ?!stoneList[0].playing stoneList[0].Recycle() stoneList.RemoveAt(0) ?loc.loop stoneList.Clear() ?RandomRange(0, 100)<=occasionalSpawnChance & occasionalSpawn = "true" stoneList.Add(MakeStonehead(random, random)) ?key = "primaryBegin" ?isClickSpawnRandom = "false" stoneList.Add(MakeStonehead(input.x, input.y)) : stoneList.Add(MakeStonehead(random, random)) ?isChaosUnleashed = "true" & totaltime % 1 = 0 stoneList.Add(MakeStonehead(random, random)) stoneList.Add(MakeStonehead(random, random)) stoneList.Add(MakeStonehead(random, random)) stoneList.Add(MakeStonehead(random, random)) ?isChaosUnleashed = "true" & chaosClearRateIncrease = "true" & stoneList.Count() ?!stoneList[0].playing stoneList[0].Recycle() stoneList.RemoveAt(0) ?!stoneList[0].playing stoneList[0].Recycle() stoneList.RemoveAt(0) ?!stoneList[0].playing stoneList[0].Recycle() stoneList.RemoveAt(0)