TCODonate
Key RequiredUniversal

TCODonate

Universal Scriptareyoumental110areyoumental110 2.7K views 8 executesUpdated Dec 30, 2024
Unrated
00
Lua Script•156 lines (5073 chars)
local delay = 0.5 -- delay before donating again
local donateamt = 0.5 -- amount to donate
-- say "changedelay" and then the delay number to change the delay ingame
-- example: changedelay 1
-- say "changedonateamt" and then the donate amount to change the donateamt ingame
-- example: changedonateamt 1



function say(text,channel)
    coroutine.wrap(function()
        --game:GetService("ReplicatedStorage"):WaitForChild("DefaultChatSystemChatEvents"):WaitForChild("SayMessageRequest"):FireServer(text,channel or "System")
        if channel and channel:lower() == "system" then
            if string.sub(text,1,1) ~= ";" then
                text = ";"..text
            end
            game:GetService("TextChatService").TextChannels.RBXSystem:SendAsync(text)
        else
            game:GetService("TextChatService").TextChannels.RBXGeneral:SendAsync(text)
        end
    end)()
end

local drag = nil
pcall(function()
    drag = loadstring(game:HttpGet("https://rawscripts.net/raw/Universal-Script-Drag-UI-SUPPORTS-MOBILE-22790"))()
end)
if drag == nil then -- your executor actually sucks if the script has to do this
    drag = function(f) -- the drag loadstring is way longer than this function, this one is just a crappy replacement
        if f then
            f.Active = true
            f.Draggable = true
        end
    end
end

local gui2 = Instance.new("ScreenGui")
gui2.Name = ""
for i=1,50 do
    gui2.Name = gui2.Name..tostring(math.random(1,9))
end
local on = false
gui2.ResetOnSpawn = false
gui2.Parent = game.CoreGui
local mainframe2 = Instance.new("TextLabel")
mainframe2.BackgroundColor3 = Color3.fromRGB(50,50,50)
mainframe2.BorderColor3 = Color3.fromRGB(255,255,255)
mainframe2.Size = UDim2.new(.1,0,.05,0)
mainframe2.Position = UDim2.new(.45,0,.475,0)
drag(mainframe2)
mainframe2.Text = "donate thingy"
mainframe2.TextScaled = true
mainframe2.TextColor3 = Color3.fromRGB(255,255,255)
mainframe2.Parent = gui2
local textbox = Instance.new("TextButton")
textbox.Position = UDim2.new(0,0,1,0)
textbox.Size = UDim2.new(1,0,2,0)
textbox.Text = "Enable"
textbox.TextScaled = true
textbox.TextColor3 = Color3.fromRGB(255,255,255)
textbox.BackgroundColor3 = Color3.fromRGB(50,50,50)
textbox.BorderColor3 = Color3.fromRGB(255,255,255)
textbox.Parent = mainframe2
textbox.MouseButton1Click:Connect(function()
	on = not on
	if on then
		textbox.Text = "Disable"
	else
		textbox.Text = "Enable"
	end
end)
local textbox2 = Instance.new("TextBox")
textbox2.Position = UDim2.new(0,0,3,0)
textbox2.Size = UDim2.new(1,0,2,0)
textbox2.Text = ""
textbox2.PlaceholderText = "Player you want to donate to"
textbox2.TextScaled = true
textbox2.TextColor3 = Color3.fromRGB(255,255,255)
textbox2.BackgroundColor3 = Color3.fromRGB(50,50,50)
textbox2.BorderColor3 = Color3.fromRGB(255,255,255)
textbox2.Parent = mainframe2
function getplayer(txt,player)
    if not txt or not player then return nil end
    if txt == "all" then
        return game.Players:GetPlayers()
    elseif txt == "others" then
        local plrs = {}
        for i,v in pairs(game.Players:GetPlayers()) do
            if v ~= player then
                table.insert(plrs,v)
            end
        end
        return plrs
    elseif txt == "me" then
        return player
    elseif txt == "random" then
        return game.Players:GetPlayers()[math.random(1,#game.Players:GetPlayers())]
    else
        for i,v in pairs(game.Players:GetPlayers()) do
            if v.Name:lower() == txt then
                return v
            end
        end
        for i,v in pairs(game.Players:GetPlayers()) do
            if string.sub(v.Name,1,string.len(txt)) == txt then
                return v
            end
        end
        for i,v in pairs(game.Players:GetPlayers()) do
            if string.find(v.Name,txt) then
                return v
            end
        end
        for i,v in pairs(game.Players:GetPlayers()) do
            if v.DisplayName:lower() == txt then
                return v
            end
        end
        for i,v in pairs(game.Players:GetPlayers()) do
            if string.sub(v.DisplayName,1,string.len(txt)) == txt then
                return v
            end
        end
        for i,v in pairs(game.Players:GetPlayers()) do
            if string.find(v.DisplayName,txt) then
                return v
            end
        end
    end
    return nil
end
local currplr = nil
local currplrtxt = nil
textbox2.FocusLost:Connect(function()
	currplr = getplayer(textbox2.Text,game.Players.LocalPlayer)
	if currplr then
		currplrtxt = currplr.Name
		if string.find(currplrtxt,"_") then
		    currplrtxt = string.sub(currplrtxt,1,string.find(currplrtxt,"_")-1)
		end
	end
end)
game.Players.LocalPlayer.Chatted:Connect(function(txt)
	local s = string.split(txt," ")
	if string.sub(txt,1,11) == "changedelay" then
		delay = tostring(s[2])
	elseif string.sub(txt,1,15) == "changedonateamt" then
		donateamt = tostring(s[2])
	end
end)
while true do
	task.wait(delay)
	if on and currplrtxt then
		say("donate "..currplrtxt.." "..tostring(donateamt),"system")
	end
end

Features & Information

dont look

Community Comments (0)

No comments yet for this script.

More Scripts for Universal Scripts