#help me with a script asap please
1 messages · Page 1 of 1 (latest)
ima give it in two chunks
local DataStoreService = game:GetService("DataStoreService")
local Players = game:GetService("Players")
local PointsStore = DataStoreService:GetDataStore("PointsSaveV1")
local admins = {
["yowavehere"] = true,
["iubitul_tau"] = true,
["costrasel"] = true
}
Players.PlayerAdded:Connect(function(player)
local stats = Instance.new("Folder")
stats.Name = "leaderstats"
stats.Parent = player
local points = Instance.new("IntValue")
points.Name = "Points"
points.Parent = stats
local saved
pcall(function()
saved = PointsStore:GetAsync(player.UserId)
end)
points.Value = saved or 0
-- Autosave loop
task.spawn(function()
while player.Parent do
task.wait(30)
pcall(function()
PointsStore:SetAsync(player.UserId, points.Value)
end)
end
end)
end)
Players.PlayerRemoving:Connect(function(player)
local stats = player:FindFirstChild("leaderstats")
if stats then
local points = stats:FindFirstChild("Points")
if points then
pcall(function()
PointsStore:SetAsync(player.UserId, points.Value)
end)
end
end
end)
-- Admin give command
Players.PlayerAdded:Connect(function(player)
player.Chatted:Connect(function(msg)
if admins[player.Name] then
local args = msg:split(" ")
if args[1] == "!givep" then
local targetName = args[2]
local amount = tonumber(args[3])
if targetName and amount then
local target = Players:FindFirstChild(targetName)
if target then
target.leaderstats.Points.Value += amount
pcall(function()
PointsStore:SetAsync(target.UserId, target.leaderstats.Points.Value)
end)
end
end
end
end
end)
end)
thats a lot of nests
💔
How is that
I hate chatgpt users
using it for assistance is fine
but to write entire code its ur fault to expect it would work
lol yeah I get it. Can’t rely on ai to make complete systems. Assistance is fine but people are just waaayyy too lazy
some ai
Oh alr
you add it to roblox studio with the plugin, and on their website you can give it prompts
it can add stuff to ur game itself
and everything
Oof
its basically a 2nd person in team create
?
by add stuff i dont mean a virus
i mean RemoteEvents and such
it does ur request in the background while u do other stuff
Never heard of that one before
its mid
I believe ya
lmao
the solution is to use programming
ok fine bro