#help me with a script asap please

1 messages · Page 1 of 1 (latest)

fringe geyser
#

a

#

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)

low lark
#

I would help

#

but

#

you used chatgpt

grizzled goblet
#

thats a lot of nests

low lark
#

he lives in a nest

grizzled goblet
#

💔

runic flame
low lark
#

using it for assistance is fine

#

but to write entire code its ur fault to expect it would work

runic flame
low lark
#

it sucks at making guis at least

runic flame
#

What’s that

low lark
#

some ai

runic flame
#

Oh alr

low lark
#

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

runic flame
#

Oof

low lark
#

its basically a 2nd person in team create

low lark
#

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

runic flame
#

Never heard of that one before

low lark
#

its mid

runic flame
#

I believe ya

low lark
#

ive only tried with guis but

#

yk

runic flame
#

Loll

low lark
#

lmao

runic flame
#

Anyways have a greate day

#

Great*

frank sparrow
#

the solution is to use programming

fringe geyser
#

ok fine bro