This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- 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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--[[ | |
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |