Skip to content

Instantly share code, notes, and snippets.

@ecurtiss
ecurtiss / DrawBeamCircle.lua
Last active October 27, 2024 00:30
Circular Beams in Roblox
--[[
Creates a circle out of Beams.
You can let it use a default Beam object, but you probably want to pass it
your own via the BeamObject parameter.
local BeamCircle, Attachments, Beams = DrawBeamCircle({
[REQUIRED]
CFrame = CFrame of center of circle,
Radius = Radius of circle,
@ecurtiss
ecurtiss / ShowUniqueStudioColors.lua
Last active August 1, 2021 03:26
Visualize all unique Roblox Studio style guide colors
-- Visualize all unique Roblox Studio style guide colors
-- The color-modifier pairs associated with each color is listed under the color's Part
-- List of colors: https://developer.roblox.com/en-us/api-reference/enum/StudioStyleGuideColor
-- PASTE INTO THE COMMAND BAR
local Themes = settings().Studio:GetAvailableThemes()
local StudioStyleGuideColors = Enum.StudioStyleGuideColor:GetEnumItems()
local StudioStyleGuideModifiers = Enum.StudioStyleGuideModifier:GetEnumItems()
local PART_LENGTH = 4
@ecurtiss
ecurtiss / ShowStudioColors.lua
Last active August 1, 2021 03:27
Visualize all Roblox Studio style guide colors
-- Visualize all Roblox Studio style guide colors
-- List of colors: https://developer.roblox.com/en-us/api-reference/enum/StudioStyleGuideColor
-- PASTE INTO THE COMMAND BAR
local ChangeHistoryService = game:GetService("ChangeHistoryService")
local Themes = settings().Studio:GetAvailableThemes()
local StudioStyleGuideColors = Enum.StudioStyleGuideColor:GetEnumItems()
local StudioStyleGuideModifiers = Enum.StudioStyleGuideModifier:GetEnumItems()
local USE_BILLBOARDS = true -- false uses Humanoid names
@ecurtiss
ecurtiss / HoverThickness.lua
Last active August 1, 2021 03:27
Shrinks the hover box in Roblox Studio when you get closer to it
local CoreGui = game:GetService("CoreGui")
local MIN_THICKNESS = 0.001
local MAX_THICKNESS = 0.04
local MIN_DIST = 2
local MAX_DIST = 10
game:GetService("RunService").Heartbeat:Connect(function()
local hoverBox = CoreGui:FindFirstChild("HoverBox")
if hoverBox and hoverBox:IsA("SelectionBox") then
local adornee = hoverBox.Adornee
@ecurtiss
ecurtiss / IsMacOS.lua
Created January 16, 2021 04:19
Detects if the client is running on macOS
-- Don't use this for anything critical; Roblox could change this functionality at any time.
-- Returns true if the client is running on macOS, otherwise false.
-- Note that it yields for a heartbeat.
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local Player = Players.LocalPlayer
local PlayerGui = Player:WaitForChild("PlayerGui")