Advertisement
TomtomFHTextures

weird gun game

Feb 27th, 2025
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 13.35 KB | None | 0 0
  1. -- Settings
  2. local Settings = {
  3.     -- Aimbot Settings
  4.     AimbotOn = false,
  5.     ShowFOV = true,
  6.     TeamCheck = true,
  7.     LockRadius = 100,
  8.     FOVColor = Color3.fromRGB(255, 255, 255),
  9.     -- ESP Settings
  10.     ESPOn = true,
  11.     UseTeamColors = false,
  12.     OwnTeamColor = Color3.fromRGB(0, 0, 255),
  13.     OpponentTeamColor = Color3.fromRGB(255, 0, 0),
  14.     -- Gun Mod Settings
  15.     InstantReload = false,
  16.     InfiniteAmmo = false,
  17.     NoRecoil = false,
  18.     NoSpread = false,
  19.     FastShoot = false
  20. }
  21.  
  22. local targetList = {
  23.     {Name = "Head", Label = "Player"},
  24. }
  25.  
  26. local Rayfield = loadstring(game:HttpGet('https://sirius.menu/rayfield'))()
  27.  
  28. local MainWindow = Rayfield:CreateWindow({
  29.     Name = "Global Aimbot & Gun Mods",
  30.     Icon = 0,
  31.     LoadingTitle = "Loading...",
  32.     LoadingSubtitle = "by TomtomFH",
  33.     Theme = "Default",
  34.  
  35.     DisableRayfieldPrompts = true,
  36.     DisableBuildWarnings = true,
  37.  
  38.     ConfigurationSaving = {
  39.         Enabled = true,
  40.         FolderName = nil,
  41.         FileName = "GlobalAimbotAndGunMods"
  42.     },
  43.  
  44.     KeySystem = true,
  45.     KeySettings = {
  46.         Title = "Global Aimbot & Gun Mods",
  47.         Subtitle = "Key System",
  48.         Note = "Get a key from TomtomFH",
  49.         FileName = "GlobalAimbotAndGunModsKey",
  50.         SaveKey = true,
  51.         GrabKeyFromSite = false,
  52.         Key = {"Hello"}
  53.     }
  54. })
  55.  
  56. local createdESPs = {}
  57.  
  58. local Players = game:GetService("Players")
  59. local LocalPlayer = Players.LocalPlayer
  60. local Workspace = game:GetService("Workspace")
  61. local Camera = Workspace.CurrentCamera
  62.  
  63. local function createESP(target)
  64.     local player = Players:GetPlayerFromCharacter(target.Parent)
  65.  
  66.     if player == LocalPlayer or not player then
  67.         return
  68.     end
  69.  
  70.     local teamColor
  71.     if Settings.UseTeamColors then
  72.         teamColor = player.TeamColor.Color
  73.     else
  74.         if player.Team == LocalPlayer.Team then
  75.             teamColor = Settings.OwnTeamColor
  76.         else
  77.             teamColor = Settings.OpponentTeamColor
  78.         end
  79.     end
  80.  
  81.     local ESPBillboard = Instance.new("BillboardGui")
  82.     ESPBillboard.Name = "ESPBillboard"
  83.     ESPBillboard.Adornee = target
  84.     ESPBillboard.AlwaysOnTop = true
  85.     ESPBillboard.Size = UDim2.new(0, 100, 0, 100)
  86.     ESPBillboard.Parent = target
  87.  
  88.     table.insert(createdESPs, ESPBillboard)
  89.  
  90.     local ESPFrame = Instance.new("Frame")
  91.     ESPFrame.Parent = ESPBillboard
  92.     ESPFrame.AnchorPoint = Vector2.new(0.5, 0.5)
  93.     ESPFrame.BackgroundColor3 = teamColor
  94.     ESPFrame.Position = UDim2.new(0.5, 0, 0.5, 0)
  95.     ESPFrame.Size = UDim2.new(0, 10, 0, 10)
  96.  
  97.     local FrameUICorner = Instance.new("UICorner")
  98.     FrameUICorner.CornerRadius = UDim.new(1, 0)
  99.     FrameUICorner.Parent = ESPFrame
  100.  
  101.     local FrameUIGradient = Instance.new("UIGradient")
  102.     FrameUIGradient.Color = ColorSequence.new(Color3.new(1, 1, 1), Color3.new(0.5, 0.5, 0.5))
  103.     FrameUIGradient.Rotation = 90
  104.     FrameUIGradient.Parent = ESPFrame
  105.  
  106.     local FrameUIStroke = Instance.new("UIStroke")
  107.     FrameUIStroke.Thickness = 2.5
  108.     FrameUIStroke.Parent = ESPFrame
  109.  
  110.     local ESPLabel = Instance.new("TextLabel")
  111.     ESPLabel.Parent = ESPBillboard
  112.     ESPLabel.AnchorPoint = Vector2.new(0, 0.5)
  113.     ESPLabel.BackgroundTransparency = 1
  114.     ESPLabel.Position = UDim2.new(0, 0, 0.5, 24)
  115.     ESPLabel.Size = UDim2.new(1, 0, 0.2, 0)
  116.     ESPLabel.Text = player and player.Name or "Unknown Player"
  117.     ESPLabel.TextColor3 = teamColor
  118.     ESPLabel.TextScaled = true
  119.  
  120.     local TextUIStroke = Instance.new("UIStroke")
  121.     TextUIStroke.Thickness = 2.5
  122.     TextUIStroke.Parent = ESPLabel
  123.  
  124.     if target.Parent and target.Parent:FindFirstChild("Humanoid") then
  125.         local humanoid = target.Parent:FindFirstChild("Humanoid")
  126.         humanoid.Died:Connect(function()
  127.             ESPBillboard:Destroy()
  128.             for i, esp in ipairs(createdESPs) do
  129.                 if esp == ESPBillboard then
  130.                     table.remove(createdESPs, i)
  131.                     break
  132.                 end
  133.             end
  134.         end)
  135.     end
  136. end
  137.  
  138. local function removeAllESPs()
  139.     for _, esp in ipairs(createdESPs) do
  140.         esp:Destroy()
  141.     end
  142.     createdESPs = {}
  143. end
  144.  
  145. local function findTarget(target, childName)
  146.     if childName then
  147.         return target:WaitForChild(childName)
  148.     end
  149.     return target
  150. end
  151.  
  152. local function scanAndApplyESP()
  153.     if not Settings.ESPOn then return end
  154.     for _, object in ipairs(Workspace:GetDescendants()) do
  155.         if object:IsA("BasePart") or object:IsA("Model") then
  156.             for _, target in ipairs(targetList) do
  157.                 if object.Name == target.Name then
  158.                     local targetObject = findTarget(object, target.ChildName)
  159.                     if targetObject then
  160.                         createESP(targetObject)
  161.                     end
  162.                 end
  163.             end
  164.         end
  165.     end
  166. end
  167.  
  168. local UIS = game:GetService("UserInputService")
  169. local LocalPlayer = Players.LocalPlayer
  170. local Mouse = LocalPlayer:GetMouse()
  171.  
  172. local ScreenGui = Instance.new("ScreenGui")
  173. ScreenGui.ResetOnSpawn = false
  174. ScreenGui.Parent = LocalPlayer:WaitForChild("PlayerGui")
  175. ScreenGui.IgnoreGuiInset = true
  176.  
  177. local RadiusFrame = Instance.new("Frame")
  178. RadiusFrame.Size = UDim2.new(0, Settings.LockRadius * 2, 0, Settings.LockRadius * 2)
  179. RadiusFrame.Position = UDim2.new(0.5, 0, 0.5, 0)
  180. RadiusFrame.AnchorPoint = Vector2.new(0.5, 0.5)
  181. RadiusFrame.BackgroundTransparency = 1
  182. RadiusFrame.Visible = Settings.ShowFOV
  183. RadiusFrame.ZIndex = 10
  184. RadiusFrame.Parent = ScreenGui
  185.  
  186. local UICorner = Instance.new("UICorner")
  187. UICorner.CornerRadius = UDim.new(1, 0)
  188. UICorner.Parent = RadiusFrame
  189.  
  190. local UIStroke = Instance.new("UIStroke")
  191. UIStroke.Thickness = 2
  192. UIStroke.Color = Settings.FOVColor
  193. UIStroke.Transparency = 0.2
  194. UIStroke.Parent = RadiusFrame
  195.  
  196. local lockOn = false
  197. local lockedTarget = nil
  198.  
  199. local function getNearestPlayer()
  200.     local closestPlayer = nil
  201.     local closestDistance = Settings.LockRadius
  202.    
  203.     for _, player in pairs(Players:GetPlayers()) do
  204.         if player ~= LocalPlayer and player.Character and player.Character:FindFirstChild("Head") then
  205.             if Settings.TeamCheck and player.Team == LocalPlayer.Team then
  206.                 continue
  207.             end
  208.  
  209.             local head = player.Character.Head
  210.             local humanoid = player.Character:FindFirstChild("Humanoid")
  211.            
  212.             if humanoid and humanoid.Health > 0 then
  213.                 local screenPos, onScreen = Camera:WorldToViewportPoint(head.Position)
  214.                
  215.                 if onScreen then
  216.                     local distance = (Vector2.new(screenPos.X, screenPos.Y) - Vector2.new(Camera.ViewportSize.X / 2, Camera.ViewportSize.Y / 2)).Magnitude
  217.                     if distance < closestDistance then
  218.                         closestDistance = distance
  219.                         closestPlayer = head
  220.                     end
  221.                 end
  222.             end
  223.         end
  224.     end
  225.    
  226.     return closestPlayer
  227. end
  228.  
  229. local AimbotTab = MainWindow:CreateTab("Aimbot", 4483362458)
  230.  
  231. local AimbotOnToggle = AimbotTab:CreateToggle({
  232.     Name = "Aimbot Enabled",
  233.     CurrentValue = Settings.AimbotOn,
  234.     Flag = "aimboton",
  235.     Callback = function(Value)
  236.         Settings.AimbotOn = Value
  237.     end,
  238. })
  239.  
  240. local ShowFOVToggle = AimbotTab:CreateToggle({
  241.     Name = "Show FOV",
  242.     CurrentValue = Settings.ShowFOV,
  243.     Flag = "fovtoggle",
  244.     Callback = function(Value)
  245.         Settings.ShowFOV = Value
  246.         RadiusFrame.Visible = Value
  247.     end,
  248. })
  249.  
  250. local TeamCheckToggle = AimbotTab:CreateToggle({
  251.     Name = "Team Check",
  252.     CurrentValue = Settings.TeamCheck,
  253.     Flag = "teamchecktoggle",
  254.     Callback = function(Value)
  255.         Settings.TeamCheck = Value
  256.     end,
  257. })
  258.  
  259. local Slider = AimbotTab:CreateSlider({
  260.     Name = "FOV Size",
  261.     Range = {1, 1000},
  262.     Increment = 10,
  263.     Suffix = "",
  264.     CurrentValue = Settings.LockRadius,
  265.     Flag = "FovValue",
  266.     Callback = function(Value)
  267.         Settings.LockRadius = Value
  268.         RadiusFrame.Size = UDim2.new(0, Value * 2, 0, Value * 2)
  269.     end,
  270. })
  271.  
  272. local FOVColorPicker = AimbotTab:CreateColorPicker({
  273.     Name = "FOV Color",
  274.     Color = Settings.FOVColor,
  275.     Flag = "fovcolorpicker",
  276.     Callback = function(Value)
  277.         Settings.FOVColor = Value
  278.         UIStroke.Color = Settings.FOVColor
  279.     end
  280. })
  281.  
  282. local ESPTab = MainWindow:CreateTab("ESP", 4483362458)
  283.  
  284. local ESPToggle = ESPTab:CreateToggle({
  285.     Name = "ESP Enable",
  286.     CurrentValue = Settings.ESPOn,
  287.     Flag = "esptoggle",
  288.     Callback = function(Value)
  289.         Settings.ESPOn = Value
  290.         if Value then
  291.             scanAndApplyESP()
  292.         else
  293.             removeAllESPs()
  294.         end
  295.     end,
  296. })
  297.  
  298. local UseTeamColorsToggle = ESPTab:CreateToggle({
  299.     Name = "Use Team Colors",
  300.     CurrentValue = Settings.UseTeamColors,
  301.     Flag = "usetmcolors",
  302.     Callback = function(Value)
  303.         Settings.UseTeamColors = Value
  304.         removeAllESPs()
  305.         scanAndApplyESP()
  306.     end,
  307. })
  308.  
  309. local OwnTeamColorPicker = ESPTab:CreateColorPicker({
  310.     Name = "Own Team Color",
  311.     Color = Settings.OwnTeamColor,
  312.     Flag = "ownteamcolorpicker",
  313.     Callback = function(Value)
  314.         Settings.OwnTeamColor = Value
  315.         removeAllESPs()
  316.         scanAndApplyESP()
  317.     end
  318. })
  319.  
  320. local OpponentTeamColorPicker = ESPTab:CreateColorPicker({
  321.     Name = "Opponent Team Color",
  322.     Color = Settings.OpponentTeamColor,
  323.     Flag = "opponentteamcolorpicker",
  324.     Callback = function(Value)
  325.         Settings.OpponentTeamColor = Value
  326.         removeAllESPs()
  327.         scanAndApplyESP()
  328.     end
  329. })
  330.  
  331. local GunModTab = MainWindow:CreateTab("Gun Mods", 4483362458)
  332.  
  333. local InstantReloadToggle = GunModTab:CreateToggle({
  334.     Name = "Instant Reload",
  335.     CurrentValue = Settings.InstantReload,
  336.     Flag = "instantreloadtoggle",
  337.     Callback = function(Value)
  338.         Settings.InstantReload = Value
  339.     end,
  340. })
  341.  
  342. local InfiniteAmmoToggle = GunModTab:CreateToggle({
  343.     Name = "Infinite Ammo",
  344.     CurrentValue = Settings.InfiniteAmmo,
  345.     Flag = "infiniteammotoggle",
  346.     Callback = function(Value)
  347.         Settings.InfiniteAmmo = Value
  348.     end,
  349. })
  350.  
  351. local NoRecoilToggle = GunModTab:CreateToggle({
  352.     Name = "No Recoil",
  353.     CurrentValue = Settings.NoRecoil,
  354.     Flag = "norecoil",
  355.     Callback = function(Value)
  356.         Settings.NoRecoil = Value
  357.     end,
  358. })
  359.  
  360. local NoSpreadToggle = GunModTab:CreateToggle({
  361.     Name = "No Spread",
  362.     CurrentValue = Settings.NoSpread,
  363.     Flag = "nospread",
  364.     Callback = function(Value)
  365.         Settings.NoSpread = Value
  366.     end,
  367. })
  368.  
  369. local FastShootToggle = GunModTab:CreateToggle({
  370.     Name = "Fast Shoot",
  371.     CurrentValue = Settings.FastShoot,
  372.     Flag = "fastshoot",
  373.     Callback = function(Value)
  374.         Settings.FastShoot = Value
  375.     end,
  376. })
  377.  
  378. UIS.InputBegan:Connect(function(input, processed)
  379.     if processed then return end
  380.     if input.UserInputType == Enum.UserInputType.MouseButton2 then
  381.         lockOn = true
  382.     end
  383. end)
  384.  
  385. UIS.InputEnded:Connect(function(input)
  386.     if input.UserInputType == Enum.UserInputType.MouseButton2 then
  387.         lockOn = false
  388.         lockedTarget = nil
  389.     end
  390. end)
  391.  
  392. Workspace.DescendantAdded:Connect(function(descendant)
  393.     if Settings.ESPOn and (descendant:IsA("BasePart") or descendant:IsA("Model")) then
  394.         for _, target in ipairs(targetList) do
  395.             if descendant.Name == target.Name then
  396.                 local targetObject = findTarget(descendant, target.ChildName)
  397.                 if targetObject then
  398.                     createESP(targetObject)
  399.                 end
  400.             end
  401.         end
  402.     end
  403. end)
  404.  
  405. game:GetService("RunService").RenderStepped:Connect(function()
  406.     if Settings.InstantReload and workspace:FindFirstChild(LocalPlayer.Name) then
  407.         local gun = workspace[LocalPlayer.Name]:FindFirstChild(LocalPlayer.Name .. "CustomGun")
  408.         if gun then
  409.             gun:SetAttribute("reloadTime", 0)
  410.         end
  411.     end
  412.  
  413.     if Settings.InfiniteAmmo and workspace:FindFirstChild(LocalPlayer.Name) then
  414.         local gun = workspace[LocalPlayer.Name]:FindFirstChild(LocalPlayer.Name .. "CustomGun")
  415.         if gun then
  416.             gun:SetAttribute("magazineSize", math.huge)
  417.         end
  418.     end
  419.  
  420.     if Settings.NoRecoil and workspace:FindFirstChild(LocalPlayer.Name) then
  421.         local gun = workspace[LocalPlayer.Name]:FindFirstChild(LocalPlayer.Name .. "CustomGun")
  422.         if gun then
  423.             gun:SetAttribute("recoilMin", Vector2.new(0, 0))
  424.             gun:SetAttribute("recoilMax", Vector2.new(0, 0))
  425.             gun:SetAttribute("recoilAimReduction", Vector2.new(0, 0))
  426.         end
  427.     end
  428.  
  429.     if Settings.NoSpread and workspace:FindFirstChild(LocalPlayer.Name) then
  430.         local gun = workspace[LocalPlayer.Name]:FindFirstChild(LocalPlayer.Name .. "CustomGun")
  431.         if gun then
  432.             gun:SetAttribute("spread", 0)
  433.         end
  434.     end
  435.  
  436.     if Settings.FastShoot and workspace:FindFirstChild(LocalPlayer.Name) then
  437.         local gun = workspace[LocalPlayer.Name]:FindFirstChild(LocalPlayer.Name .. "CustomGun")
  438.         if gun then
  439.             gun:SetAttribute("rateOfFire", math.huge)
  440.         end
  441.     end
  442.  
  443.     if lockOn and Settings.AimbotOn then
  444.         lockedTarget = getNearestPlayer()
  445.         if lockedTarget then
  446.             Camera.CFrame = CFrame.new(Camera.CFrame.Position, lockedTarget.Position)
  447.         end
  448.     end
  449. end)
  450.  
  451. scanAndApplyESP()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement