Gun
Key RequiredUniversal

Gun

Universal Scriptramadanopeyemi2boysramadanopeyemi2boys 366 views 96 executesUpdated Feb 28, 2026
Unrated
00
Lua Script•37 lines (1119 chars)
local tool = script.Parent
local allowedPlayerName = "YOUR_USERNAME_HERE" -- change this to your Roblox username
local damage = 100 -- 100 will instantly kill most players
local debounce = false

tool.Activated:Connect(function()
	if debounce then return end
	debounce = true
	
	local character = tool.Parent
	local player = game.Players:GetPlayerFromCharacter(character)
	
	-- Only allow you to use it
	if not player or player.Name ~= allowedPlayerName then
		debounce = false
		return
	end
	
	local handle = tool:FindFirstChild("Handle")
	if not handle then return end
	
	-- Raycast shooting
	local origin = handle.Position
	local direction = handle.CFrame.LookVector * 500
	
	local raycastParams = RaycastParams.new()
	raycastParams.FilterDescendantsInstances = {character}
	raycastParams.FilterType = Enum.RaycastFilterType.Blacklist
	
	local result = workspace:Raycast(origin, direction, raycastParams)
	
	if result then
		local hitPart = result.Instance
		local hitCharacter = hitPart:FindFirstAncestorOfClass("Model")
		
		if hitCharacter then
			local humanoid = hitCharacter:FindFirstChildrbxassetid://12221720

Features & Information

Xphxdhydxufuf

Community Comments (0)

No comments yet for this script.

More Scripts for Universal Scripts