
The script is in the last video's description, if you want to copy and paste the script you can find it there, however the script will not work unless you've followed along with the whole course.
Here's the script we wrote during the course:
local DatastoreService = game:GetService("DataStoreService")
local Datastore = DatastoreService:GetDataStore("Points211234")
game.Players.PlayerAdded:Connect(function(player)
local clone = script.leaderstats:Clone()
clone.Parent = player
player.CharacterAdded:Connect(function(character)
character.Humanoid.WalkSpeed = clone.Points.Value * 0.5 + 1 + player.leaderstats.Rebirth.Value * 5
end)
clone.Points.Changed:Connect(function()
local character = player.Character
character.Humanoid.WalkSpeed = clone.Points.Value * 0.5 + 1 + player.leaderstats.Rebirth.Value * 5
end)
local character = player.Character or player.CharacterAdded:Wait()
character.Humanoid.WalkSpeed = 3
local key = player.UserId .. "Points"
local savedPoints = Datastore:GetAsync(key)
if savedPoints then
clone.Points.Value = savedPoints[1]
clone.Rebirth.Value = savedPoints[2]
end
end)
game.Players.PlayerRemoving:Connect(function(player)
local key = player.UserId .. "Points"
local points = player.leaderstats.Points.Value
local rebirths = player.leaderstats.Rebirth.Value
local array = {points, rebirths}
Datastore:SetAsync(key, array)
end)
game.ReplicatedStorage.Rebirth.OnServerEvent:Connect(function(plr, rebirth)
if rebirth == true then
if plr.leaderstats.Points.Value >= 1000 then
plr.leaderstats.Rebirth.Value = plr.leaderstats.Rebirth.Value + 1
plr.leaderstats.Points.Value = 0
end
plr.PlayerGui.Rebirth:Destroy()
elseif rebirth == false then
plr.PlayerGui.Rebirth:Destroy()
end
end)
In this course you will learn how to make your first Simulator game in Roblox! You will learn about Roblox studio and get an insight on the different things you can do inside of the studio. You will learn the basics of Roblox game development, and you'll also learn some programming along the way!
You will learn how to set up Roblox Studio, how to make parts and change the parts' looks by changing its properties! I will go over everything that you would need to make a Roblox game. We will create a map, take care of the Gameplay, make a shop, and more! We will go over leveraging the toolbox so you can learn from what other developers have made, and we'll also go over how you can use their creations in your own game! You'll learn all the necessary steps of making a Roblox simulator. After the main part of the course there are extra videos where we handle stuff like Rebirthing, these are optional but recommended! You can follow along as we go, but I also recommend you to add your own spin to your game! You can even make it better in whatever way you want.
This course is intended for purchase by adults, if you're under 18, you may use the services only if a parent or guardian opens your account, handles any enrolments, and manages your account usage.
At the end of this course, you will hopefully have built your own Roblox Simulator!