Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- self = script.Parent
- gui = script
- while not gui:IsA("ScreenGui") do
- gui = gui.Parent
- if gui.Name == "PlayerGui" then
- error()
- end
- end
- local scale = 0.8
- function updateSelf()
- local h = gui.AbsoluteSize.Y*scale
- script.Parent.Size = UDim2.new(0,h,0,h)
- script.Parent.Position = UDim2.new(0.5,h/-2,0.5,h/-2)
- end
- updateSelf()
- gui.Changed:connect(updateSelf)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement