local Rayfield = loadstring(game:HttpGet('https://[Log in to view URL]'))()
local Window = Rayfield:CreateWindow({
Name = "IYN SCRIPTS",
Icon = 0, -- Icon in Topbar. Can use Lucide Icons (string) or Roblox Image (number). 0 to use no icon (default).
LoadingTitle = "LOADING IYN SCRIPTS",
LoadingSubtitle = "by IYN",
ShowText = "IYN SCRIPTS", -- for mobile users to unhide rayfield, change if you'd like
Theme = "Amethyst", -- Check https://[Log in to view URL]
ToggleUIKeybind = "K", -- The keybind to toggle the UI visibility (string like "K" or Enum.KeyCode)
DisableRayfieldPrompts = false,
DisableBuildWarnings = false, -- Prevents Rayfield from warning when the script has a version mismatch with the interface
ConfigurationSaving = {
Enabled = false,
FolderName = nil, -- Create a custom folder for your hub/game
FileName = "Big Hub"
},
Discord = {
Enabled = false, -- Prompt the user to join your Discord server if their executor supports it
Invite = "noinvitelink", -- The Discord invite code, do not include discord.gg/. E.g. discord.gg/ ABCD would be ABCD
RememberJoins = true -- Set this to false to make them join the discord every time they load it up
},
KeySystem = false, -- Set this to true to use our key system
KeySettings = {
Title = "Untitled",
Subtitle = "Key System",
Note = "No method of obtaining the key is provided", -- Use this to tell the user how to get a key
FileName = "Key", -- It is recommended to use something unique as other scripts using Rayfield may overwrite your key file
SaveKey = true, -- The user's key will be saved, but if you change the key, they will be unable to use your script
GrabKeyFromSite = false, -- If this is true, set Key below to the RAW site you would like Rayfield to get the key from
Key = {"Hello"} -- List of keys that will be accepted by the system, can be RAW file links (pastebin, github etc) or simple strings ("hello","key22")
}
})
local MainTab = Window:CreateTab("Main", nil) -- Title, Image
local Button = MainTab:CreateButton({
Name = "Sword Reach (GUI)",
Callback = function()
loadstring(game:HttpGet('https://[Log in to view URL]'))()
end,
})
local Button = MainTab:CreateButton({
Name = "ESP all players",
Callback = function()
-- Simple player highlighting and nametag script with toggle feature now
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local UserInputService = game:GetService("UserInputService")
local LocalPlayer = Players.LocalPlayer
local MaxDistance = 400.5 -- Range in studs for nametags to show
-- Toggle variable
local NametagsEnabled = true
-- Function to create a nametag for a player
local function CreateNametag(Player)
if Player == LocalPlayer then return end -- Skip local player
local function SetupNametag(Character)
local Head = Character:FindFirstChild("Head")
if not Head then return end -- If no head, exit
-- Remove existing nametag if it exists
local OldNametag = Head:FindFirstChild("Nametag")
if OldNametag then
OldNametag:Destroy()
end
local BillboardGui = Instance.new("BillboardGui")
BillboardGui.Name = "Nametag"
BillboardGui.Adornee = Head
BillboardGui.Size = UDim2.new(0, 75, 0, 150)
BillboardGui.StudsOffset = Vector3.new(0, 2, 0)
BillboardGui.AlwaysOnTop = true
local TextLabel = Instance.new("TextLabel")
TextLabel.Size = UDim2.new(1, 0, 1, 0)
TextLabel.Text = Player.Name
TextLabel.TextColor3 = Color3.fromRGB(255, 255, 255) -- White color
TextLabel.BackgroundTransparency = 1
TextLabel.TextStrokeTransparency = 0.75 -- Outline for better visibility
TextLabel.Font = Enum.Font.Code
TextLabel.TextScaled = true
TextLabel.Parent = BillboardGui
BillboardGui.Parent = Head
-- Function to update visibility based on distance and toggle
local function UpdateVisibility()
if NametagsEnabled and Player.Character and Player.Character:FindFirstChild("Head") and LocalPlayer.Character and LocalPlayer.Character:FindFirstChild("Head") then
local Distance = (Player.Character.Head.Position - LocalPlayer.Character.Head.Position).Magnitude
BillboardGui.Enabled = (Distance <= MaxDistance)
else
BillboardGui.Enabled = false
end
end
-- Monitor visibility
local Connection
Connection = RunService.Heartbeat:Connect(function()
if Player.Character and Player.Character:FindFirstChild("Head") then
UpdateVisibility()
else
BillboardGui:Destroy() -- Clean up nametag when player dies
Connection:Disconnect()
end
end)
end
-- Apply when character spawns or respawns
if Player.Character then
SetupNametag(Player.Character)
end
Player.CharacterAdded:Connect(SetupNametag)
end
-- Function to apply ESP/Highlight to a player
local function ApplyHighlight(Player)
if Player == LocalPlayer then return end -- Skip local player
local function SetupHighlight(Character)
-- Remove old highlights
for _, v in pairs(Character:GetChildren()) do
if v:IsA("Highlight") then
v:Destroy()
end
end
local Highlighter = Instance.new("Highlight")
Highlighter.Parent = Character
local function UpdateFillColor()
local DefaultColor = Color3.fromRGB(255, 48, 51) -- Default red color
Highlighter.FillColor = Player.TeamColor and Player.TeamColor.Color or DefaultColor
end
UpdateFillColor()
Player:GetPropertyChangedSignal("TeamColor"):Connect(UpdateFillColor)
-- Remove highlight when player dies
local Humanoid = Character:FindFirstChildOfClass("Humanoid")
if Humanoid then
Humanoid.Died:Connect(function()
Highlighter:Destroy()
end)
end
end
-- Apply highlight on spawn and respawn
if Player.Character then
SetupHighlight(Player.Character)
end
Player.CharacterAdded:Connect(SetupHighlight)
end
-- Function to toggle nametags
local function ToggleNametags()
NametagsEnabled = not NametagsEnabled -- Flip the toggle state
print("Nametags Enabled:", NametagsEnabled)
for _, Player in pairs(Players:GetPlayers()) do
if Player ~= LocalPlayer and Player.Character and Player.Character:FindFirstChild("Head") then
local Nametag = Player.Character.Head:FindFirstChild("Nametag")
if Nametag then
Nametag.Enabled = NametagsEnabled
end
end
end
end
-- Bind the toggle function to the "[" key
UserInputService.InputBegan:Connect(function(Input, GameProcessed)
if not GameProcessed and Input.KeyCode == Enum.KeyCode.LeftBracket then
ToggleNametags()
end
end)
-- Apply ESP and Nametags to all current players
for _, Player in pairs(Players:GetPlayers()) do
CreateNametag(Player)
ApplyHighlight(Player)
end
-- Apply ESP and Nametags to players who join later
Players.PlayerAdded:Connect(function(Player)
CreateNametag(Player)
ApplyHighlight(Player)
end)
-- 4/3/2025 X:XXPM (Script Updated)
-- 4/4/2025 1:59PM (Edit / Update)
end,
})
local Button = MainTab:CreateButton({
Name = "Camera lock (PC ONLY)",
Callback = function()
loadstring(game:HttpGet("https://[Log in to view URL]"))()
end,
})
To embed this project on your website, copy the following code and paste it into your website's HTML: