Need help with datastore editing for gold

Hello - i have recently followed berezaa’s mining sim tutorial, and i want to know how i can edit players coins and so on. i think i have the datastore script here. please correct me if i am wrong.

local Saving = require(game.ServerScriptService.Saving)
local Utl = require(game.ServerScriptService.Utl)

local function SaveData(Player)
	pcall(function()
		Utl.CheckPasses(Player)
	end)
	local PlayerData = Utl.GetPlayerData(Player.userId)
	
	if Player:FindFirstChild("DataLoaded") and PlayerData ~= nil then

		
		PlayerData.Inventory = PlayerData.Inventory 
		PlayerData.BaseData = PlayerData.BaseData
		PlayerData.Emblems = PlayerData.Emblems 
		PlayerData.Storage = PlayerData.Storage 
		PlayerData.XP = (Player:FindFirstChild("XP") and math.ceil(Player.XP.Value)) 
		PlayerData.Level = (Player:FindFirstChild("Level") and Player.Level.Value) 
		PlayerData.Pickaxe = (Player:FindFirstChild("Pickaxe") and Player.Pickaxe.Value) 
		PlayerData.Mute = (Player:FindFirstChild("Mute") and Utl.BoolToInt(Player.Mute.Value)) 
		PlayerData.Gold = (Player:FindFirstChild("Gold") and Player.Gold.Value)  
		PlayerData.DiscordAward = (Player:FindFirstChild("DiscordAward") and Player.DiscordAward.Value)  
		PlayerData.Crystals = (Player:FindFirstChild("Crystals") and Player.Crystals.Value)
		PlayerData.LastGift = (Player:FindFirstChild("LastGift") and Player.LastGift.Value)
		PlayerData.Emblem = (Player:FindFirstChild("Emblem") and Player.Emblem.Value) 
		PlayerData.Tutorial = (Player:FindFirstChild("Tutorial") and Player.Tutorial.Value)
		PlayerData.GoldQuest = (Player:FindFirstChild("GoldQuest") and Player.GoldQuest.Value)
		PlayerData.EventStatus = (Player:FindFirstChild("EventStatus") and Player.EventStatus.Value)
		-- Use difference from when they joined and now to record total playtime
		if PlayerData.TimeStamp and PlayerData.TimeStamp > 0 then
			
			PlayerData.TotalPlaytime = PlayerData.TotalPlaytime + (PlayerData.TimeStamp - os.time())
		end
		-- aaand reset TimeStamp
		PlayerData.TimeStamp = os.time()
		PlayerData.LifetimeOreTotal = PlayerData.LifetimeOreTotal
		
		

		local Success, Error = Saving.SaveData(Player, PlayerData)
		
		print("Saving Results")
		print(Success, Error)
		
		-- Attempt to save their billboard data, but don't let it interfere with important data
		spawn(function() 
			pcall(function()
				local Leaderboard = game:GetService("DataStoreService"):GetOrderedDataStore("TopMiner"..tostring(Utl.CurrentDay()))
				Leaderboard:IncrementAsync(Player.userId, Player.OreMined.Value)
				PlayerData.LifetimeOreTotal = PlayerData.LifetimeOreTotal + Player.OreMined.Value
				Player.OreMined.Value = 0
			end)
		end)

		return Success, Error
	end
end

local function LoadData(Player, RequestedTime)
	if game.ServerStorage.WorthlessGarbage:FindFirstChild(Player.Name) then
		game.ServerStorage.WorthlessGarbage:FindFirstChild(Player.Name):Destroy()
	end
	pcall(function()
		Utl.CheckPasses(Player)
	end)

	local Success, PlayerData, Error, TimeStamp = Saving.LoadData(Player)
	TimeStamp = TimeStamp or 0
	
	if not Success then
		return Success, Error
	elseif RequestedTime and RequestedTime > 1 then
		if (RequestedTime - 1) >= (TimeStamp) then
			return false, "Waiting for newer data"
		end
	end
	
	PlayerData.DiscordAward = PlayerData.DiscordAward or 0
	PlayerData.LifetimeOreTotal = PlayerData.LifetimeOreTotal or 0
	
	PlayerData.TotalPlaytime = PlayerData.TotalPlaytime or 0

	PlayerData["Inventory"] = PlayerData["Inventory"] or {}
	PlayerData["Storage"] = PlayerData["Storage"] or {}
	PlayerData["BaseData"] = PlayerData["BaseData"] or {}
	PlayerData["Emblems"] = PlayerData["Emblems"] or {}
	PlayerData["Pickaxes"] = PlayerData["Pickaxes"] or {}
	
	PlayerData.TimeStamp = os.time()
	
	for i,Pickaxe in pairs(game.ReplicatedStorage.Pickaxes:GetChildren()) do
		PlayerData.Pickaxes[Pickaxe.Name] = PlayerData.Pickaxes[Pickaxe.Name] or false
	end	
	
	if PlayerData.Pickaxe ~= nil then
		PlayerData.Pickaxes[PlayerData.Pickaxe] = true
	end
	
	
	for i,Ore in pairs(game.ReplicatedStorage.Ores:GetChildren()) do
		PlayerData.Inventory[Ore.Name] = PlayerData.Inventory[Ore.Name] or 0
		PlayerData.Storage[Ore.Name] = PlayerData.Storage[Ore.Name] or 0
	end
	for i,Item in pairs(game.ServerStorage.BaseParts:GetChildren()) do
		PlayerData.BaseData[Item.Name] = PlayerData.BaseData[Item.Name] or 0
	end
	for i,Emblem in pairs(game.ReplicatedStorage.Emblems:GetChildren()) do
		PlayerData.Emblems[Emblem.Name] = PlayerData.Emblems[Emblem.Name] or false
	end
		
	
	Utl.NewPlayerData(Player, PlayerData)
	
	--Temp value for storing ore counts every session
	
	local OreMined = Instance.new("IntValue")
	OreMined.Name = "OreMined"
	OreMined.Value = 0
	OreMined.Parent = Player

	
	--Value for gold quest
	

	
	-- EVENT CLAUSE 

	
	local GoldQuest = Instance.new("StringValue")
	GoldQuest.Name = "GoldQuest"
	if PlayerData.GoldQuest ~= "Done" and PlayerData.GoldQuest ~= "Started" and PlayerData.GoldQuest ~= "Awarded" then
		PlayerData.GoldQuest = ""
	end
	GoldQuest.Value = PlayerData.GoldQuest or ""
	GoldQuest.Parent = Player
	
	local Tag = Instance.new("BoolValue")
	Tag.Name = "Loading"
	Tag.Parent = Player
	
	local Emblem = Instance.new("StringValue")
	Emblem.Name = "Emblem"
	Emblem.Value = PlayerData["Emblem"] or ""
	Emblem.Parent = Player
	
	local XP = Instance.new("NumberValue")
	XP.Name = "XP"
	XP.Value = PlayerData["XP"] or 0
	XP.Parent = Player
	
	local Level = Instance.new("IntValue")
	Level.Name = "Level"
	Level.Value = PlayerData["Level"] or 1
	Level.Parent = Player
	
	local Gold = Instance.new("NumberValue")
	Gold.Name = "Gold"
	Gold.Value = PlayerData["Gold"] or 50
	Gold.Parent = Player
	
	local DiscordAward = Instance.new("IntValue")
	DiscordAward.Name = "DiscordAward"
	DiscordAward.Value = PlayerData["DiscordAward"] or 0
	DiscordAward.Parent = Player
	
	local Crystals = Instance.new("NumberValue")

the kit if you want to help further - Infinite Mining Game Kit v4 by berezaa - Roblox

To help I need to see the module script.

Im not near my pc rn - will send it tomorrow or if you want you can download the kit from the link i put and check.
Thanks for your response.

You can use Crazyman32’s DataStore editor plugin. This is the best solution for your problem

If you want to edit your own data, you can simply run studio, switch to the server, and change the Gold NumberValue’s value (which is stored in the player).
Studio API access must be enabled

If you want to edit another players data, use the method posted by @sardorking2005.

2 Likes

Thanks fir your reply, i have crazyman32’s datastore editor, but i am confused how do i use it?

Here is a video made by Crazyman32 himself.

sorry, i should’ve said i have watched this. i feel like i haven’t explained enough (my fault for not being clear) i have searched everywhere and i dont know where to find the ‘DataStore Name’ also the ‘DataStore Scope’ and the ‘Key’.