Check out example codes for "- Workspace.Arrow.GettingStands:24: Expected 'then' when parsing if statement, got <eof>". It will help you in understanding the concepts better.

Code Example 1

local Clickdetector = game.Workspace.Arrow.ClickDetector
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local StandsInGeneral = ReplicatedStorage:WaitForChild("StandsInGeneral")
local RarityChances = require(ReplicatedStorage:WaitForChild("RarityChances"))

if Clickdetector.MouseClick:connect(function(player)
		local StandNumber = math.random (1,100)
		local StandFound = false 
		local Stand = nil
		while StandFound == false do
			for i, v in pairs (RarityChances.StandsInGeneral) do
				if StandNumber < 50 then 
				StandFound = true 
					Stand = "Star Platinum"
					print ("Wow you got Star Platinum !")
				elseif StandNumber > 50 then
					StandFound = true
					Stand = "The World"
					print "Wow you got The World !"
			          else
end
end		  
end	
end)

Learn ReactJs, React Native from akashmittal.com