Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local FillColor = Color3.fromRGB(175,25,255)
- local DepthMode = "AlwaysOnTop"
- local FillTransparency = 0.5
- local OutlineColor = Color3.fromRGB(255,255,255)
- local OutlineTransparency = 0
- local CoreGui = game:FindService("CoreGui")
- local Players = game:FindService("Players")
- local lp = Players.LocalPlayer
- local connections = {}
- local Storage = Instance.new("Folder")
- Storage.Parent = CoreGui
- Storage.Name = "Highlight_Storage"
- local function Highlight(plr)
- local Highlight = Instance.new("Highlight")
- Highlight.Name = plr.Name
- Highlight.FillColor = FillColor
- Highlight.DepthMode = DepthMode
- Highlight.FillTransparency = FillTransparency
- Highlight.OutlineColor = OutlineColor
- Highlight.OutlineTransparency = 0
- Highlight.Parent = Storage
- local plrchar = plr.Character
- if plrchar then
- Highlight.Adornee = plrchar
- end
- connections[plr] = plr.CharacterAdded:Connect(function(char)
- Highlight.Adornee = char
- end)
- end
- Players.PlayerAdded:Connect(Highlight)
- for i,v in next, Players:GetPlayers() do
- Highlight(v)
- end
- Players.PlayerRemoving:Connect(function(plr)
- local plrname = plr.Name
- if Storage[plrname] then
- Storage[plrname]:Destroy()
- end
- if connections[plr] then
- connections[plr]:Disconnect()
- end
- end)
- -- Create a ScreenGui to hold our crosshair
- local gui = Instance.new("ScreenGui")
- gui.Parent = game.Players.LocalPlayer.PlayerGui
- -- Create a Frame for the horizontal line of the crosshair
- local horizontalLine = Instance.new("Frame")
- horizontalLine.Size = UDim2.new(0, 20, 0, 2) -- Adjust the size and thickness here
- horizontalLine.BackgroundColor3 = Color3.fromRGB(255, 255, 255) -- Starting color
- horizontalLine.BorderSizePixel = 0
- horizontalLine.Parent = gui
- -- Create a Frame for the vertical line of the crosshair
- local verticalLine = Instance.new("Frame")
- verticalLine.Size = UDim2.new(0, 2, 0, 20) -- Adjust the size and thickness here
- verticalLine.BackgroundColor3 = Color3.fromRGB(255, 255, 255) -- Starting color
- verticalLine.BorderSizePixel = 0
- verticalLine.Parent = gui
- -- Function to update the crosshair's position
- local function updateCrosshairPosition()
- local mouse = game.Players.LocalPlayer:GetMouse()
- horizontalLine.Position = UDim2.new(0, mouse.X - 10, 0, mouse.Y)
- verticalLine.Position = UDim2.new(0, mouse.X, 0, mouse.Y - 10)
- end
- -- Connect the update function to the mouse move event
- game:GetService("RunService").RenderStepped:Connect(updateCrosshairPosition)
- -- Function to update the crosshair's color
- local function updateCrosshairColor()
- local hue = tick() % 5 / 5 -- Cycle through colors every 5 seconds
- horizontalLine.BackgroundColor3 = Color3.fromHSV(hue, 1, 1)
- verticalLine.BackgroundColor3 = Color3.fromHSV(hue, 1, 1)
- end
- -- Connect the update function to the heartbeat event
- game:GetService("RunService").Heartbeat:Connect(updateCrosshairColor)
- -- Custom Crosshair by zzerexx#3970
- getgenv().CrosshairSettings = {
- Color = Color3.fromRGB(255,0,0),
- RainbowColor = true,
- Opacity = 9,
- Length = 10,-- Length of each line
- Thickness = 2,-- Thickness of each line
- Offset = 4, -- Offset from the middle point
- Dot = true, -- not recommended
- FollowCursor = false, -- Crosshair follows the cursor
- HideMouseIcon = true, -- Hides the mouse icon, set to 0 to ignore
- HideGameCrosshair = true, -- Hides the current game's crosshair (if its supported)
- ToggleKey = Enum.KeyCode.RightAlt, -- Toggles crosshair visibility
- } -- v1.2.1
- loadstring(game:HttpGet("https://raw.githubusercontent.com/zzerexx/scripts/main/CustomCrosshair.lua", true))()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement