Skip to content

Instantly share code, notes, and snippets.

View Nimblz's full-sized avatar
🍳
Scrambling eggs

Austin Reuschle Nimblz

🍳
Scrambling eggs
View GitHub Profile
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local CollectionService = game:GetService("CollectionService")
local RunService = game:GetService("RunService")
local Workspace = game:GetService("Workspace")
local Players = game:GetService("Players")
local LocalPlayer = Players.LocalPlayer
local common = ReplicatedStorage.common
local hitIsYou = require(common.util.hitIsYou)
-- Author: Nimblz (Austin Reuschle)
-- @123eee555
-- extremely simple mass gui element tweener
-- designed with basic 2d particle fx in mind
local TweenService = game:GetService("TweenService")
return function(parent, numParticles, tweenInfo, initialPropsFunc, finalPropsFunc)
numParticles = numParticles or 5
tweenInfo = tweenInfo or TweenInfo.new(
1,
local Table3d = {}
function Table3d.new(defaultValue)
local self = setmetatable({},{__index = Table3d})
self.defaultValue = defaultValue
self._table = {}
return self
end
@Nimblz
Nimblz / FloatyAnimator.lua
Created March 10, 2020 21:01
wibble wobble
local Workspace = game:GetService("Workspace")
local CollectionService = game:GetService("CollectionService")
local RunService = game:GetService("RunService")
local FLOATY_TAG = "floaty"
local PI = math.pi
local TAU = PI * 2
local SPEED = 1.5
@Nimblz
Nimblz / lua.code-snippets
Created February 8, 2020 21:43
my current snippets for roblox development
{
// Place your snippets for lua here. Each snippet is defined under a snippet name and has a prefix, body and
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the
// same ids are connected.
// Example:
// "Print to console": {
// "prefix": "log",
// "body": [
// "console.log('$1');",
local function isOutside(bounds, controlPoint)
local relativePosition = bounds.CFrame:PointToObjectSpace(controlPoint)
local xDist = math.abs(relativePosition.X)
local yDist = math.abs(relativePosition.Y)
local zDist = math.abs(relativePosition.Z)
if xDist > bounds.Size.X/2 then
return true
elseif yDist > bounds.Size.Y/2 then
return true
local RunService = game:GetService("RunService")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local character = script.Parent
local springModel = ReplicatedStorage.spring
springModel.Parent = workspace
local current = springModel.Current
local goal = springModel.Goal
local lowest = 234208
local highest = 765869
local function numDigits(number)
return math.floor( math.log(number, 10) + 1 )
end
-- gross
local function digitAt(number, x)
local stringified = tostring(number)
@Nimblz
Nimblz / Day3.lua
Last active December 3, 2019 19:02
Advent of code day 3
local InstructionSets = require(script.InstructionSets)
local WireWorld = require(script.WireWorld)
local Directions = {
["U"] = Vector2.new( 0, 1),
["D"] = Vector2.new( 0,-1),
["L"] = Vector2.new(-1, 0),
["R"] = Vector2.new( 1, 0),
}
@Nimblz
Nimblz / Day2
Created December 2, 2019 19:28
Day2.lua
local inputString = require(script.Input)
local inputStringArray = inputString:split(",")
local ADD = 1
local MULTIPLY = 2
local opFunctions = {
[ADD] = function(input1, input2)
return input1 + input2
end,