First script, in workspace:

local status = game.ReplicatedStorage:FindFirstChild("Status") 
wait(3) --This is how much time to wait before the dialogue changes!
status.Value = "Welcome." --The  first dialogue in your game!
wait(3)
status.Value = "I can see you're bored."
wait(3)
status.Value = "This is just an ordinary game, a flat baseplate, okay?"
wait(5)
status.Value = "Why are you still here?"
wait(3)
status.Value = "What do you mean you want me to tell you a secret?"
wait(5)
status.Value = "Okay, get the coin and I'll tell you."
game.ServerStorage.Coin.Parent = workspace

** Next script, in the coin, in serverstorage,**

function OnTouch(hit) -- The start of the function, hit or anything else within those brackets is used for
	-- interacting with the player that activated the function.
	script.Parent.Parent.Parent = game.ServerStorage
	game.ReplicatedStorage.Status.Value = "You really thought that would work?"
	
	wait(3)
	game.ReplicatedStorage.Status.Value = "Ok fine, I'll give you a leaderboard."
	game.ReplicatedStorage.Ree:FireClient()
	
	
~~~~~~~~~~~~~~~~~

end

 -- Ends the function
	 
	~~~~~~~~~~~~~~~~~
script.Parent.Touched:connect(OnTouch) -- In this example the script is inside a brick that you touch,
-- 'Touched' an action that triggers the function, connect is like connecting to the "function service" -- --- (doesn't exist) and OnTouch is the function your triggering.

** Lastly, a script inside serverscriptservice,**

game.ReplicatedStorage.Ree.OnServerEvent:Connect(function()
game.Players.PlayerAdded:Connect(function(plr)
	    local leaderstats = Instance.new("Folder", plr)
	    leaderstats.Name = "leaderstats"
	 
		  
		 wait(3)
		local Points = Instance.new("IntValue", leaderstats)
		   
		 Points.Name = "Money"
	    Points.Value = 1



5 comments

0

why are the codeblocks like this

0

your code blocks kinda fucked up there buddy

0

This really is fucked up though ????????

0

dont swear plz

0

dont swear plz