This file contains hidden or 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
-- Put this in a Part (: | |
local gui = Instance.new("SurfaceGui") -- Creates a SurfaceGui | |
gui.Parent = script.Parent -- Don’t forget to set the parent! | |
gui.SizingMode = "PixelsPerStud" -- Same as Enum.SurfaceGuiSizingMode.PixelsPerStud | |
local text = Instance.new("TextLabel") -- Creates a TextLabel | |
text.Parent = gui -- Parent to the gui | |
text.Size = UDim2.fromScale(1,1) -- Gets scaled to Max (x,y) | |
text.BackgroundTransparency = 1 -- Sets background transparency to 1 (fully transparent) |
This file contains hidden or 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
--BubuTheDev’s Simple DataStore | |
--Saves player’s leaderstats when leaves or disconnected | |
--Loads and sets the leaderstats when joining the game. | |
local Players = game:GetService("Players") | |
local DataStoreService = game:GetService("DataStoreService") | |
local SAVE_NAME = "LeaderstatsData" --changing it will change data (can be used for testing purposes) | |
local Data = DataStoreService:GetDataStore(SAVE_NAME) |