Skip to content

Instantly share code, notes, and snippets.

@jaipack17
jaipack17 / Pivot.lua
Last active June 6, 2022 13:24
Rotation Pivots for Guis on Roblox
-- Pivot.lua by jaipack17
-- Last updated: 02/04/2022
-- License: MIT
-- Easily create rotation pivots for GuiObjects on Roblox.
-- The API is similar to the Pivot API available for BaseParts.
-- Pivot.SetAngleMode(angleMode: string) -> Set angle mode for the pivot. Either DEGREES or RADIANS. By default set to DEGREES.
-- Pivot.ApplyIgnoreGuiInsetOffset(apply: boolean) -> Apply Offset of Vector2.new(0, 36) to the center position of the GuiObject.
-- Set this to true if your ScreenGui is ignoring GuiInset.
@jaipack17
jaipack17 / GuiPivot.lua
Created November 12, 2021 13:08
Pivots for guis
--[[
Example:
local Pivot = require(game:GetService("ReplicatedStorage").GuiPivot)
local Foo = Pivot.new(gui, gui.AbsolutePosition)
Foo:Rotate(45) -- rotates by 45 degrees around the pivot
]]
local Pivot = {}
Pivot.__index = Pivot
@jaipack17
jaipack17 / PerlineNoiseLoop.lua
Last active October 19, 2021 13:33
Perlin Noise Loop Animation w/ Fusion Components!
local Fusion = require(game:GetService("ReplicatedStorage").Fusion)
local PlayerGui = game:GetService("Players").LocalPlayer:WaitForChild("PlayerGui")
game:GetService("StarterGui"):SetCoreGuiEnabled(Enum.CoreGuiType.All, false)
-- [FUSION]
local New = Fusion.New
local Children = Fusion.Children