Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Giving infinite tools to everyone?, please help if you are smart.

So yesterday i asked why it would give tools to everyone. Now it gives infinite tools??

no i don't want any link. Just give me the script and explain

Here's the script:

local Part = game.Workspace.BuyPart




local RS = game:GetService("ReplicatedStorage")
local Sword = RS.Tools:FindFirstChild("SpeedCoil")
local Players = game:GetService("Players")

Part.Touched:Connect(function(hit)
	
	local Player = game.Players:GetPlayerFromCharacter(hit.Parent)
	
	if Player.leaderstats.Points.Value >= 500 then
			
		local SwordClone = Sword:Clone()
		
		SwordClone.Parent = Player.Backpack
	end
	
	local GravityCoil = RS.Tools:FindFirstChild("GravityCoil")
	local Part1 = game.Workspace.BuyPart1
	
	Part1.Touched:Connect(function(hit)
		if hit.Parent:FindFirstChild("Humanoid") then
			
			
			if Player.leaderstats.Points.Value >= 7000 then
					
				local CoilClone = GravityCoil:Clone()
			
				CoilClone.Parent = Player.Backpack
				
				
	end
	
	local Part2 = game.Workspace.BuyPart2
	local Tool = RS.Tools:FindFirstChild("PointGiverTool")
	
	Part2.Touched:Connect(function(hit)

if hit.Parent:FindFirstChild("Humanoid") then
	
			
			if Player.leaderstats.Points.Value >= 10000 then
				
				local ToolClone = Tool:Clone()
				ToolClone.Parent = Player.Backpack
				
			end
			end
			end)
				end
				end)
					end)

Thanks.

3 comments

0

I'm too lazy to write your script, but after the if statement to check if they have enough points check if there is an item named like your item you will give them already in the backpack.

0

okay nice

0

i do not understand what you mean.. at all

1 answer

You didn't subtract the points, you only checked if they have enough points.

1 comment

0

facepalm I appreciate the Answer but... I asked why it was giving tools infinitely.

This discussion is preserved as it was. New answers, comments, and votes are closed.