local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local Workspace = game:GetService("Workspace")
local LocalPlayer = Players.LocalPlayer

local moveConnection
local movementEnabled = false
local currentWalkSpeed = 16
local fastFallSpeed = -200

local function getHumanoid()
	local char = LocalPlayer.Character
	if char then
		return char:FindFirstChildOfClass("Humanoid")
	end
end

local function keepUpright()
	local char = LocalPlayer.Character
	if char then
		local hrp = char:FindFirstChild("HumanoidRootPart")
		if hrp then
			hrp.RotVelocity = Vector3.zero
			hrp.CFrame = CFrame.new(hrp.Position, hrp.Position + Vector3.new(hrp.CFrame.LookVector.X, 0, hrp.CFrame.LookVector.Z))
		end
	end
end

local function isGrounded(hrp)
	local rayParams = RaycastParams.new()
	rayParams.FilterDescendantsInstances = {LocalPlayer.Character}
	rayParams.FilterType = Enum.RaycastFilterType.Blacklist
	local ray = Workspace:Raycast(hrp.Position, Vector3.new(0, -6, 0), rayParams)
	return ray ~= nil
end

local function teleportForward(distance)
	local char = LocalPlayer.Character
	if not char then return end
	local hrp = char:FindFirstChild("HumanoidRootPart")
	local humanoid = char:FindFirstChildOfClass("Humanoid")
	if not hrp or not humanoid then return end
	humanoid:ChangeState(0)
	repeat task.wait() until not LocalPlayer:GetAttribute("LastACPos")
	local origin = hrp.Position
	local direction = hrp.CFrame.LookVector * distance
	local rayParams = RaycastParams.new()
	rayParams.FilterDescendantsInstances = {char}
	rayParams.FilterType = Enum.RaycastFilterType.Blacklist
	local raycastResult = Workspace:Raycast(origin, direction, rayParams)
	local teleportPos = raycastResult and (raycastResult.Position - hrp.CFrame.LookVector * 2) or (origin + direction)
	if not isGrounded(hrp) then
		hrp.Velocity = Vector3.new(hrp.Velocity.X, fastFallSpeed, hrp.Velocity.Z)
	else
		hrp.Velocity = Vector3.zero
	end
	hrp.CFrame = CFrame.new(teleportPos, teleportPos + hrp.CFrame.LookVector)
	keepUpright()
end

local function startWalkLoop()
	if moveConnection then moveConnection:Disconnect() end
	moveConnection = RunService.Heartbeat:Connect(function(dt)
		if movementEnabled then
			local humanoid = getHumanoid()
			if humanoid then
				keepUpright()
				if humanoid.MoveDirection.Magnitude > 0 then
					teleportForward(currentWalkSpeed * dt)
				else
					local hrp = LocalPlayer.Character and LocalPlayer.Character:FindFirstChild("HumanoidRootPart")
					if hrp and not isGrounded(hrp) then
						hrp.Velocity = Vector3.new(hrp.Velocity.X, fastFallSpeed, hrp.Velocity.Z)
					end
				end
			end
		end
	end)
end

local function stopWalkLoop()
	if moveConnection then
		moveConnection:Disconnect()
		moveConnection = nil
	end
	keepUpright()
end

local Toggle = MainTab:CreateToggle({
	Name = "Enable Teleport Walk",
	CurrentValue = false,
	Flag = "WalkToggle",
	Callback = function(Value)
		movementEnabled = Value
		if movementEnabled then
			startWalkLoop()
		else
			stopWalkLoop()
		end
	end,
})

local Slider = MainTab:CreateSlider({
	Name = "Walk Speed",
	Range = {10, 100},
	Increment = 1,
	Suffix = "Speed",
	CurrentValue = 16,
	Flag = "WalkSlider",
	Callback = function(Value)
		currentWalkSpeed = Value
	end,
})


local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local lp = Players.LocalPlayer

local gunOn = false
local gunRain = false
local gunColor = Color3.fromRGB(255,0,0)
local gunAlpha = 0.3
local savedGunParts = {}
local curGun = nil
local gunHL = nil

local function doGun(tool)
	if not gunOn or not tool then return end
	local clr = gunRain and Color3.fromHSV(tick()%5/5,1,1) or gunColor
	for _,v in ipairs(tool:GetDescendants()) do
		if v:IsA("BasePart") then
			if not savedGunParts[v] then
				savedGunParts[v] = {c=v.Color,t=v.Transparency}
			end
			pcall(function()
				v.Color = clr
				v.Transparency = math.clamp(gunAlpha,0,0.9)
			end)
		end
	end
	if not gunHL or gunHL.Adornee~=tool then
		if gunHL then pcall(function() gunHL:Destroy() end) end
		gunHL = Instance.new("Highlight")
		gunHL.Adornee = tool
		gunHL.Parent = tool
	end
	gunHL.FillTransparency = 1
	gunHL.OutlineTransparency = 0
	gunHL.OutlineColor = clr
end

local function undoGun()
	for p,data in pairs(savedGunParts) do
		if p and p.Parent then
			pcall(function()
				p.Color = data.c
				p.Transparency = data.t
			end)
		end
	end
	savedGunParts = {}
	if gunHL then
		pcall(function() gunHL:Destroy() end)
		gunHL = nil
	end
end

local function hookTool(tool)
	if not tool:IsA("Tool") then return end
	tool.Equipped:Connect(function()
		curGun = tool
		if gunOn then doGun(tool) end
	end)
	tool.Unequipped:Connect(function()
		if curGun==tool then
			undoGun()
			curGun=nil
		end
	end)
end

local function hookChar(c)
	c.ChildAdded:Connect(hookTool)
	for _,v in ipairs(c:GetChildren()) do
		hookTool(v)
	end
end

if lp.Character then hookChar(lp.Character) end
lp.CharacterAdded:Connect(hookChar)


MainTab:CreateToggle({
	Name = "Enable Gun Chams",
	CurrentValue = gunOn,
	Callback = function(v)
		gunOn=v
		if v and curGun then doGun(curGun) else undoGun() end
	end
})

MainTab:CreateColorPicker({
	Name = "Gun Color",
	Color = gunColor,
	Callback = function(c)
		gunColor=c
		if gunOn and curGun then doGun(curGun) end
	end
})

MainTab:CreateToggle({
	Name = "Rainbow Gun",
	CurrentValue = gunRain,
	Callback = function(v)
		gunRain=v
	end
})

MainTab:CreateSlider({
	Name = "Gun Transparency",
	Range = {0, 0.9},
	Increment = 0.01,
	CurrentValue = gunAlpha,
	Callback = function(v)
		gunAlpha=v
		if gunOn and curGun then doGun(curGun) end
	end
})


local plyOn=false
local plyRain=false
local plyCol=Color3.fromRGB(0,255,255)
local plyOutline=true
local plyOutlineCol=Color3.fromRGB(0,0,0)
local plyAlpha=0.3
local plyMat=Enum.Material.ForceField
local savedParts={}
local charHL=nil

local function updateHL(char)
	if not char then return end
	if plyOutline and plyOn then
		if not charHL or charHL.Adornee~=char then
			if charHL then pcall(function() charHL:Destroy() end) end
			charHL=Instance.new("Highlight")
			charHL.Adornee=char
			charHL.Parent=char
		end
		charHL.FillTransparency=1
		charHL.OutlineTransparency=0
		charHL.OutlineColor=plyOutlineCol
	elseif charHL then
		pcall(function() charHL:Destroy() end)
		charHL=nil
	end
end

local function doPly(c)
	if not plyOn or not c then return end
	local clr=plyRain and Color3.fromHSV(tick()%5/5,1,1) or plyCol
	for _,v in ipairs(c:GetDescendants()) do
		if v:IsA("BasePart") and v.Name~="HumanoidRootPart" then
			if not savedParts[v] then
				savedParts[v]={m=v.Material,t=v.Transparency,c=v.Color}
			end
			pcall(function()
				v.Material=plyMat
				v.Color=clr
				v.Transparency=(plyMat==Enum.Material.Glass) and plyAlpha or math.clamp(plyAlpha,0,0.9)
			end)
		end
	end
	updateHL(c)
end

local function undoPly()
	for p,data in pairs(savedParts) do
		if p and p.Parent then
			pcall(function()
				p.Material=data.m
				p.Transparency=data.t
				p.Color=data.c
			end)
		end
	end
	savedParts={}
	if charHL then
		pcall(function() charHL:Destroy() end)
		charHL=nil
	end
end

lp.CharacterAdded:Connect(function(c)
	local hum=c:WaitForChild("Humanoid",5)
	if plyOn then
		task.wait(0.5)
		doPly(c)
	end
	if hum then
		hum.Died:Connect(function()
			savedParts={}
			if charHL then
				pcall(function() charHL:Destroy() end)
				charHL=nil
			end
		end)
	end
end)

--// Rayfield - Player Tab
MainTab:CreateToggle({
	Name = "Enable Player Chams",
	CurrentValue = plyOn,
	Callback = function(v)
		plyOn=v
		if v and lp.Character then doPly(lp.Character) else undoPly() end
	end
})

MainTab:CreateColorPicker({
	Name = "Player Color",
	Color = plyCol,
	Callback = function(c)
		plyCol=c
		if plyOn and lp.Character then doPly(lp.Character) end
	end
})

MainTab:CreateToggle({
	Name = "Rainbow Player",
	CurrentValue = plyRain,
	Callback = function(v)
		plyRain=v
	end
})

MainTab:CreateToggle({
	Name = "Outline",
	CurrentValue = plyOutline,
	Callback = function(v)
		plyOutline=v
		if plyOn and lp.Character then updateHL(lp.Character) end
	end
})

MainTab:CreateColorPicker({
	Name = "Outline Color",
	Color = plyOutlineCol,
	Callback = function(c)
		plyOutlineCol=c
		if plyOn and lp.Character then updateHL(lp.Character) end
	end
})

MainTab:CreateSlider({
	Name = "Transparency",
	Range = {0, 0.9},
	Increment = 0.01,
	CurrentValue = plyAlpha,
	Callback = function(v)
		plyAlpha=v
		if plyOn and lp.Character then doPly(lp.Character) end
	end
})

MainTab:CreateDropdown({
	Name = "Material",
	Options = {"ForceField","Neon","Foil","Glass"},
	CurrentOption = "ForceField",
	Callback = function(v)
		plyMat=Enum.Material[v] or Enum.Material.ForceField
		if plyOn and lp.Character then doPly(lp.Character) end
	end
})

RunService.RenderStepped:Connect(function()
	if gunOn and gunRain and curGun then doGun(curGun) end
	if plyOn and plyRain and lp.Character then doPly(lp.Character) end
end)


local ReplicatedStorage = cloneref(game:GetService("ReplicatedStorage"))
local Players = cloneref(game:GetService("Players"))

local Player = Players.LocalPlayer
local Character, Backpack

local function updateCharacter()
    Character = Player.Character or Player.CharacterAdded:Wait()
    Backpack = Player:WaitForChild("Backpack")
end

updateCharacter()

Player.CharacterAdded:Connect(updateCharacter)

local running = false

local function getPing()
    if typeof(Player.GetNetworkPing) == "function" then
        local success, result = pcall(function()
            return tonumber(string.match(Player:GetNetworkPing(), "%d+"))
        end)
        if success and result then 
            return result 
        end
    end
    local t0 = tick()
    local temp = Instance.new("BoolValue")
    temp.Parent = ReplicatedStorage
    temp.Name = "PingTest_" .. tostring(math.random(10000, 99999))
    task.wait(0.1)
    local t1 = tick()
    temp:Destroy()
    return math.clamp((t1 - t0) * 1000, 50, 300)
end

local function dupeOne()
    local Tool = Character:FindFirstChildOfClass("Tool") or Backpack:FindFirstChildOfClass("Tool")
    if not Tool then return end
    Tool.Parent = Backpack
    task.wait(0.5)

    local ToolName = Tool.Name
    local ToolId
    local delay = 0.25 + ((math.clamp(getPing(), 0, 300) / 300) * 0.03)

    local conn
    conn = ReplicatedStorage.MarketItems.ChildAdded:Connect(function(item)
        if item.Name == ToolName then
            local owner = item:WaitForChild("owner", 2)
            if owner and owner.Value == Player.Name then
                ToolId = item:GetAttribute("SpecialId")
            end
        end
    end)

    task.spawn(function() ReplicatedStorage.ListWeaponRemote:FireServer(ToolName, 99999) end)
    task.wait(delay)
    task.spawn(function() ReplicatedStorage.BackpackRemote:InvokeServer("Store", ToolName) end)
    task.wait(3)
    if ToolId then
        task.spawn(function() ReplicatedStorage.BuyItemRemote:FireServer(ToolName, "Remove", ToolId) end)
    end
    task.spawn(function() ReplicatedStorage.BackpackRemote:InvokeServer("Grab", ToolName) end)
    conn:Disconnect()
end

task.spawn(function()
    while true do
        if running then
            dupeOne()
            task.wait(1.5)
        else
            task.wait(0.1)
        end
    end
end)

MainTab:CreateButton({
    Name = "Dupe Gun",
    Callback = function()
        dupeOne()
    end,
})

MainTab:CreateToggle({
    Name = "Auto Dupe Gun",
    CurrentValue = false,
    Flag = "AutoDupeGun",
    Callback = function(Value)
        running = Value
    end,
})

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: