Skip to content

Instantly share code, notes, and snippets.

View MonzterDev's full-sized avatar

Monzter MonzterDev

View GitHub Profile
@DavidCatalano
DavidCatalano / perfectViewportFrameRotate.lua
Created September 11, 2022 21:59
Roblox perfectly sized Viewport Frame with model rotation
-- Perfect ViewportFrame Script with 360 degree Rotate
-- thanks to @sleitnick https://www.youtube.com/watch?v=2J-2v_UqNDw for the hard part
-- Put this code in a LocalScript inside of a ScreenGui in StarterGui
-- Change the reference to the model a few lines down to point to your model
-- Delete rows 40 and below if you don't want the rotate code
local makeModelSpin = true -- change this to false to keep the model stationary
local viewportFrame = Instance.new("ViewportFrame")
local camera = Instance.new("Camera" , viewportFrame)
@stravant
stravant / GoodSignal.lua
Last active October 12, 2025 18:15
Good Roblox Signal Implementation
--------------------------------------------------------------------------------
-- Batched Yield-Safe Signal Implementation --
-- This is a Signal class which has effectively identical behavior to a --
-- normal RBXScriptSignal, with the only difference being a couple extra --
-- stack frames at the bottom of the stack trace when an error is thrown. --
-- This implementation caches runner coroutines, so the ability to yield in --
-- the signal handlers comes at minimal extra cost over a naive signal --
-- implementation that either always or never spawns a thread. --
-- --
-- API: --
@EgoMoose
EgoMoose / ViewportModel.lua
Last active October 29, 2025 14:33
Lua class to calculate camera distance/cframe for fitting models into viewport frames
--[[
MIT License
Copyright (c) 2021 EgoMoose
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is