C

@Cvullo

math

Lua
3 years ago
function round100(n) return math.floor(n*100)/100 end function round3(n) return math.floor(n/3)*3 end local signs = { "K", "M", "B",

unfinishedlol

Lua
3 years ago
local game = {} local services = {} services["PlayerService"] = {} services["EventService"] = {} services["EventService"].__index = game["EventService"] local Instance = {} game.Workspace = {}

Logic Gates In Lua (unfinished)

Lua
3 years ago
local function split(inputstr, sep) if sep == nil then sep = "%s" end local t = {} for str in string.gmatch(inputstr, "([^"..sep.."]+)") do table.insert(t, str) end return t end

e

Lua
3 years ago
function basen(n,b, digits) n = math.floor(n) if not b or b == 10 then return tostring(n) end local t = {} local sign = "" if n < 0 then sign = "" n = -n end if type(digits) == "string" then

encrypt thingy

Lua
3 years ago
local alphabet = "abcdefghijklmnopqrstuvwxyz" function getLetter(n, key, msg, data) key = tostring(key) local q = n local s = math.abs(n-(math.floor(n/#key)*#key)) if s == 0 then s = 5 end local a = tonumber(key:sub(s, s))

Enchant Thing

Lua
3 years ago
numberMap = { {1000, 'M'}, {900, 'CM'}, {500, 'D'}, {400, 'CD'}, {100, 'C'}, {90, 'XC'}, {50, 'L'}, {40, 'XL'}, {10, 'X'},

Rarities

Lua
3 years ago
local rarities = {"Basic", "Common", "Uncommon", "Rare", "Epic", "Legendary", "Mythical", "Divine", "Super", "Mega", "Ultra", "Omega", "Extreme", "Ultimate", "Insane", "Hyper", "Godly", "Unique", "Exotic", "Supreme", "Celestial", "Eternal", "Cosmic", "Heavenly", "Stellar", "Infinity", "Dimensional", "Reality"} local signs = {"-", "", "+", "++"} function inttoRarity(n) if n > #rarities * #signs then return rarities[#rarities].."+"..((n-(#rarities*#signs))+2) end local num = (math.ceil(n/4))

a

Lua
3 years ago
function round100(n) return math.floor(n*100)/100 end function round3(n) return math.floor(n/3)*3 end local signs = { "K", "M", "B",

Nice

Lua
3 years ago
-- set machine level to whatever in program input local names = {"Normal", "Bronze", "Silver", "Gold", "Sapphire", "Emerald", "Ruby", "Amethyst", "Diamond", "Opal", "Crystal", "Topaz", "Painite", "Azure", "Quartz", "Ammolite", "Flourite", "Citrine", "Tourmaline", "Bismuth", "Obsidian", "Chromite"} function round100(n) return math.floor(n*100)/100 end function round3(n) return math.floor(n/3)*3 end local signs = {

A thinngg

Lua
3 years ago
local function shorten(n) local num = (n/10^((math.floor(math.log10(n))))) local e = math.floor(math.log10(n)) return num, e end local bnum = {} function bnum.strtobnum(str)

Thing

Lua
3 years ago
local game = { PlayerService = {}; } function game:NewInstance(className, Parent, InstanceName) if className == "Folder" then Parent[InstanceName] = {Name = InstanceName; ClassName = "Folder"} return Parent[InstanceName] end if className == "IntValue" then Parent[InstanceName] = {Name = InstanceName; ClassName = "IntValue"; Value = 0}

Thing

Lua
3 years ago
function thing(n) local words = { "Junior", "Senior", } local str = "" repeat if (n % 2) == 0 then n = n - 2 str = str.." "..words[2]

Shortening thing

Lua
3 years ago
function round100(n) return math.floor(n*100)/100 end function round3(n) return math.floor(n/3)*3 end local signs = { "K", "M", "B",

Rounding function

Lua
3 years ago
function round(n) local floorednum = math.floor(n) if n < (floorednum+0.5) then return floorednum end if n >= (floorednum+0.5) then return math.ceil(n) end end local thing = 0

Luck game things

Lua
3 years ago
local luck = 0 while true do local num = math.random(1,1000000000) local chosen = "None" luck = luck + 1 if num <= 1000000000*luck then chosen = "Normal" if num <= 100000000*luck then chosen = "Bronze" if num <= 10000000*luck then

Cool functions for me

Lua
3 years ago
function percenttochance(num) local chance = 100/num return "1/"..chance end function chancetopercent(num) local percent = 100/num return percent.."%" end function chancebigtochance(m, n)

Rng generator

Lua
3 years ago
local num = 0 local rng = 0 local best = 0 repeat repeat local r = math.random(0, 2000) if num < 1 then num = 1 else num = num*2000/1.999/1000

Thing

Lua
3 years ago
local plrs = {} local name = "" for i = 1, 5 do if i == 1 then name = "far" elseif i == 2 then name = "close" elseif i == 3 then name = "near" elseif i == 4 then

Roman numerals system

Lua
3 years ago
numberMap = { {1000, 'M'}, {900, 'CM'}, {500, 'D'}, {400, 'CD'}, {100, 'C'}, {90, 'XC'}, {50, 'L'}, {40, 'XL'}, {10, 'X'},

My first c++

C++
3 years ago
#include <iostream> using namespace std; int FavNum = 1; int main() { if (FavNum < 2) { FavNum = 100; } cout << "My Favorite Number Is " << FavNum; return 0;