Advertisement
creepstu

Crosshair Project [Roblox Script]

Mar 8th, 2024 (edited)
623
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 15.92 KB | None | 0 0
  1. local CP = game.CoreGui:FindFirstChild("CrosshairProject")
  2.  
  3. if CP then
  4.     CP:Destroy()
  5. end
  6.  
  7. local CrosshairProject = Instance.new("ScreenGui")
  8. local Crosshair = Instance.new("ImageLabel")
  9. local Frame = Instance.new("Frame")
  10. local UICorner = Instance.new("UICorner")
  11. local ChangeCrosshairId = Instance.new("ImageButton")
  12. local UICorner_2 = Instance.new("UICorner")
  13. local AimbotMobile = Instance.new("ImageButton")
  14. local UICorner_3 = Instance.new("UICorner")
  15. local DropShadowHolder = Instance.new("Frame")
  16. local DropShadow = Instance.new("ImageLabel")
  17. local FrameCCID = Instance.new("Frame")
  18. local DropShadowHolder_2 = Instance.new("Frame")
  19. local DropShadow_2 = Instance.new("ImageLabel")
  20. local Source = Instance.new("TextBox")
  21. local UICorner_4 = Instance.new("UICorner")
  22. local UITextSizeConstraint = Instance.new("UITextSizeConstraint")
  23. local Cancel = Instance.new("TextButton")
  24. local UICorner_5 = Instance.new("UICorner")
  25. local UITextSizeConstraint_2 = Instance.new("UITextSizeConstraint")
  26. local Set = Instance.new("TextButton")
  27. local UICorner_6 = Instance.new("UICorner")
  28. local UITextSizeConstraint_3 = Instance.new("UITextSizeConstraint")
  29. local DecalPreview = Instance.new("ImageLabel")
  30. local AskUser = Instance.new("TextLabel")
  31.  
  32. CrosshairProject.Name = "CrosshairProject"
  33. CrosshairProject.ZIndexBehavior = Enum.ZIndexBehavior.Global
  34. CrosshairProject.IgnoreGuiInset = true
  35.  
  36. Crosshair.Name = "Crosshair"
  37. Crosshair.Parent = CrosshairProject
  38. Crosshair.AnchorPoint = Vector2.new(0.5, 0.5)
  39. Crosshair.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  40. Crosshair.BackgroundTransparency = 1.000
  41. Crosshair.BorderColor3 = Color3.fromRGB(0, 0, 0)
  42. Crosshair.BorderSizePixel = 0
  43. Crosshair.Position = UDim2.new(0.5, 0, 0.5, 0)
  44. Crosshair.Image = "rbxassetid://15217977355"
  45.  
  46. Frame.Parent = CrosshairProject
  47. Frame.AnchorPoint = Vector2.new(0.5, 0.5)
  48. Frame.BackgroundColor3 = Color3.fromRGB(34, 40, 34)
  49. Frame.BorderColor3 = Color3.fromRGB(0, 0, 0)
  50. Frame.BorderSizePixel = 0
  51. Frame.Position = UDim2.new(0, -41, 0.5, 0)
  52. Frame.Size = UDim2.new(0, 50, 0, 100)
  53.  
  54. UICorner.Parent = Frame
  55.  
  56. ChangeCrosshairId.Name = "ChangeCrosshairId"
  57. ChangeCrosshairId.Parent = Frame
  58. ChangeCrosshairId.AnchorPoint = Vector2.new(0.5, 0)
  59. ChangeCrosshairId.BackgroundColor3 = Color3.fromRGB(34, 40, 34)
  60. ChangeCrosshairId.BorderColor3 = Color3.fromRGB(0, 0, 0)
  61. ChangeCrosshairId.BorderSizePixel = 0
  62. ChangeCrosshairId.Position = UDim2.new(0.5, 0, 0, 9)
  63. ChangeCrosshairId.Size = UDim2.new(0, 32, 0, 32)
  64. ChangeCrosshairId.Image = "http://www.roblox.com/asset/?id=6022668955"
  65.  
  66. UICorner_2.Parent = ChangeCrosshairId
  67.  
  68. AimbotMobile.Name = "AimbotMobile"
  69. AimbotMobile.Parent = Frame
  70. AimbotMobile.AnchorPoint = Vector2.new(0.5, 0)
  71. AimbotMobile.BackgroundColor3 = Color3.fromRGB(34, 40, 34)
  72. AimbotMobile.BorderColor3 = Color3.fromRGB(0, 0, 0)
  73. AimbotMobile.BorderSizePixel = 0
  74. AimbotMobile.Position = UDim2.new(0.5, 0, 1, -41)
  75. AimbotMobile.Size = UDim2.new(0, 32, 0, 32)
  76. AimbotMobile.Image = "http://www.roblox.com/asset/?id=6026647916"
  77.  
  78. UICorner_3.Parent = AimbotMobile
  79.  
  80. DropShadowHolder.Name = "DropShadowHolder"
  81. DropShadowHolder.Parent = Frame
  82. DropShadowHolder.BackgroundTransparency = 1.000
  83. DropShadowHolder.BorderSizePixel = 0
  84. DropShadowHolder.Size = UDim2.new(1, 0, 1, 0)
  85. DropShadowHolder.ZIndex = 0
  86.  
  87. DropShadow.Name = "DropShadow"
  88. DropShadow.Parent = DropShadowHolder
  89. DropShadow.AnchorPoint = Vector2.new(0.5, 0.5)
  90. DropShadow.BackgroundTransparency = 1.000
  91. DropShadow.BorderSizePixel = 0
  92. DropShadow.Position = UDim2.new(0.5, 0, 0.5, 0)
  93. DropShadow.Size = UDim2.new(1, 47, 1, 47)
  94. DropShadow.ZIndex = 0
  95. DropShadow.Image = "rbxassetid://6014261993"
  96. DropShadow.ImageColor3 = Color3.fromRGB(0, 0, 0)
  97. DropShadow.ImageTransparency = 0.500
  98. DropShadow.ScaleType = Enum.ScaleType.Slice
  99. DropShadow.SliceCenter = Rect.new(49, 49, 450, 450)
  100.  
  101. FrameCCID.Name = "FrameCCID"
  102. FrameCCID.Parent = CrosshairProject
  103. FrameCCID.AnchorPoint = Vector2.new(0.5, 0.5)
  104. FrameCCID.BackgroundColor3 = Color3.fromRGB(34, 40, 34)
  105. FrameCCID.BorderColor3 = Color3.fromRGB(0, 0, 0)
  106. FrameCCID.BorderSizePixel = 0
  107. FrameCCID.Position = UDim2.new(0.5, 0, 2, 0)
  108. FrameCCID.Size = UDim2.new(0, 200, 0, 100)
  109.  
  110. DropShadowHolder_2.Name = "DropShadowHolder"
  111. DropShadowHolder_2.Parent = FrameCCID
  112. DropShadowHolder_2.BackgroundTransparency = 1.000
  113. DropShadowHolder_2.BorderSizePixel = 0
  114. DropShadowHolder_2.Size = UDim2.new(1, 0, 1, 0)
  115. DropShadowHolder_2.ZIndex = 0
  116.  
  117. DropShadow_2.Name = "DropShadow"
  118. DropShadow_2.Parent = DropShadowHolder_2
  119. DropShadow_2.AnchorPoint = Vector2.new(0.5, 0.5)
  120. DropShadow_2.BackgroundTransparency = 1.000
  121. DropShadow_2.BorderSizePixel = 0
  122. DropShadow_2.Position = UDim2.new(0.5, 0, 0.5, 0)
  123. DropShadow_2.Size = UDim2.new(1, 47, 1, 47)
  124. DropShadow_2.ZIndex = 0
  125. DropShadow_2.Image = "rbxassetid://6015897843"
  126. DropShadow_2.ImageColor3 = Color3.fromRGB(0, 0, 0)
  127. DropShadow_2.ImageTransparency = 0.500
  128. DropShadow_2.ScaleType = Enum.ScaleType.Slice
  129. DropShadow_2.SliceCenter = Rect.new(49, 49, 450, 450)
  130.  
  131. Source.Name = "Source"
  132. Source.Parent = FrameCCID
  133. Source.AnchorPoint = Vector2.new(0.5, 0)
  134. Source.BackgroundColor3 = Color3.fromRGB(117, 113, 94)
  135. Source.BorderColor3 = Color3.fromRGB(0, 0, 0)
  136. Source.BorderSizePixel = 0
  137. Source.Position = UDim2.new(0.5, 0, 0, 10)
  138. Source.Size = UDim2.new(0, 180, 0, 20)
  139. Source.ZIndex = 2
  140. Source.ClearTextOnFocus = false
  141. Source.Font = Enum.Font.RobotoMono
  142. Source.PlaceholderText = "Enter Decal ID here..."
  143. Source.Text = ""
  144. Source.TextColor3 = Color3.fromRGB(247, 248, 241)
  145. Source.TextScaled = true
  146. Source.TextSize = 14.000
  147. Source.TextWrapped = true
  148.  
  149. UICorner_4.Parent = Source
  150.  
  151. UITextSizeConstraint.Parent = Source
  152. UITextSizeConstraint.MaxTextSize = 14
  153.  
  154. Cancel.Name = "Cancel"
  155. Cancel.Parent = FrameCCID
  156. Cancel.AnchorPoint = Vector2.new(1, 1)
  157. Cancel.BackgroundColor3 = Color3.fromRGB(102, 102, 102)
  158. Cancel.BorderColor3 = Color3.fromRGB(0, 0, 0)
  159. Cancel.BorderSizePixel = 0
  160. Cancel.Position = UDim2.new(1, -40, 1, -5)
  161. Cancel.Size = UDim2.new(0, 50, 0, 15)
  162. Cancel.Font = Enum.Font.Arial
  163. Cancel.Text = "CANCEL"
  164. Cancel.TextColor3 = Color3.fromRGB(0, 0, 0)
  165. Cancel.TextScaled = true
  166. Cancel.TextSize = 10.000
  167. Cancel.TextWrapped = true
  168.  
  169. UICorner_5.Parent = Cancel
  170.  
  171. UITextSizeConstraint_2.Parent = Cancel
  172. UITextSizeConstraint_2.MaxTextSize = 10
  173.  
  174. Set.Name = "Set"
  175. Set.Parent = FrameCCID
  176. Set.AnchorPoint = Vector2.new(1, 1)
  177. Set.BackgroundColor3 = Color3.fromRGB(102, 102, 102)
  178. Set.BorderColor3 = Color3.fromRGB(0, 0, 0)
  179. Set.BorderSizePixel = 0
  180. Set.Position = UDim2.new(1, -5, 1, -5)
  181. Set.Size = UDim2.new(0, 30, 0, 15)
  182. Set.Font = Enum.Font.Arial
  183. Set.Text = "SET"
  184. Set.TextColor3 = Color3.fromRGB(0, 0, 0)
  185. Set.TextScaled = true
  186. Set.TextSize = 10.000
  187. Set.TextWrapped = true
  188.  
  189. UICorner_6.Parent = Set
  190.  
  191. UITextSizeConstraint_3.Parent = Set
  192. UITextSizeConstraint_3.MaxTextSize = 10
  193.  
  194. DecalPreview.Name = "DecalPreview"
  195. DecalPreview.Parent = FrameCCID
  196. DecalPreview.AnchorPoint = Vector2.new(0, 1)
  197. DecalPreview.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  198. DecalPreview.BackgroundTransparency = 1.000
  199. DecalPreview.BorderColor3 = Color3.fromRGB(0, 0, 0)
  200. DecalPreview.BorderSizePixel = 0
  201. DecalPreview.Position = UDim2.new(0, 0, 1, 0)
  202. DecalPreview.Size = UDim2.new(0, 50, 0, 50)
  203.  
  204. AskUser.Name = "AskUser"
  205. AskUser.Parent = FrameCCID
  206. AskUser.AnchorPoint = Vector2.new(0.5, 0.5)
  207. AskUser.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  208. AskUser.BackgroundTransparency = 1.000
  209. AskUser.BorderColor3 = Color3.fromRGB(0, 0, 0)
  210. AskUser.BorderSizePixel = 0
  211. AskUser.Position = UDim2.new(0.5, 0, 0.5, -12)
  212. AskUser.Size = UDim2.new(0, 150, 0, 15)
  213. AskUser.Visible = false
  214. AskUser.ZIndex = 2
  215. AskUser.Font = Enum.Font.Unknown
  216. AskUser.Text = "Is this the crosshair you want?"
  217. AskUser.TextColor3 = Color3.fromRGB(247, 248, 241)
  218. AskUser.TextScaled = true
  219. AskUser.TextSize = 14.000
  220. AskUser.TextWrapped = true
  221.  
  222. CrosshairProject.Parent = game.CoreGui
  223.  
  224. local function SUEKV_fake_script() -- ChangeCrosshairId.LocalScript
  225.     local script = Instance.new('LocalScript', ChangeCrosshairId)
  226.  
  227.     local scr = script.Parent
  228.     local fccid = script.Parent.Parent.Parent.FrameCCID
  229.    
  230.     scr.MouseButton1Click:Connect(function()
  231.         fccid:TweenPosition(
  232.             UDim2.new(0.5, 0,0.7, 0),
  233.             "Out",
  234.             "Sine",
  235.             1,
  236.             false
  237.         )
  238.     end)
  239. end
  240. coroutine.wrap(SUEKV_fake_script)()
  241. local function VDWL_fake_script() -- AimbotMobile.LocalScript
  242.     local script = Instance.new('LocalScript', AimbotMobile)
  243.  
  244.     onClicked = function()
  245.         local fov = 40
  246.         local maxDistance = math.huge
  247.         local maxTransparency = 0.1
  248.         local teamCheck = true
  249.        
  250.         local RunService = game:GetService("RunService")
  251.         local UserInputService = game:GetService("UserInputService")
  252.         local Players = game:GetService("Players")
  253.         local Cam = game.Workspace.CurrentCamera
  254.    
  255.         local FOVring = Drawing.new("Circle")
  256.         FOVring.Visible = true
  257.         FOVring.Thickness = 2
  258.         FOVring.Color = Color3.fromRGB(128, 0, 128)
  259.         FOVring.Filled = false
  260.         FOVring.Radius = fov
  261.         FOVring.Position = Cam.ViewportSize / 2
  262.    
  263.         local function updateDrawings()
  264.             local camViewportSize = Cam.ViewportSize
  265.             FOVring.Position = camViewportSize / 2
  266.         end
  267.    
  268.         local function onKeyDown(input)
  269.             if input.KeyCode == Enum.KeyCode.Delete then
  270.                 RunService:UnbindFromRenderStep("FOVUpdate")
  271.                 FOVring:Remove()
  272.             end
  273.         end
  274.    
  275.         UserInputService.InputBegan:Connect(onKeyDown)
  276.    
  277.         local function lookAt(target)
  278.             local lookVector = (target - Cam.CFrame.Position).unit
  279.             local newCFrame = CFrame.new(Cam.CFrame.Position, Cam.CFrame.Position + lookVector)
  280.             Cam.CFrame = newCFrame
  281.         end
  282.    
  283.         local function calculateTransparency(distance)
  284.             local maxDistance = fov
  285.             local transparency = (1 - (distance / maxDistance)) * maxTransparency
  286.             return transparency
  287.         end
  288.    
  289.         local function isPlayerAlive(player)
  290.             local character = player.Character
  291.             if character and character:FindFirstChild("Humanoid") then
  292.                 return character.Humanoid.Health > 0
  293.             end
  294.             return false
  295.         end
  296.    
  297.         local function getClosestPlayerInFOV(trg_part)
  298.             local nearest = nil
  299.             local last = math.huge
  300.             local playerMousePos = Cam.ViewportSize / 2
  301.             local localPlayer = Players.LocalPlayer
  302.    
  303.             for i = 1, #Players:GetPlayers() do
  304.                 local player = Players:GetPlayers()[i]
  305.                 if player and player ~= localPlayer and (not teamCheck or player.Team ~= localPlayer.Team) then
  306.                     if isPlayerAlive(player) then
  307.                         local part = player.Character and player.Character:FindFirstChild(trg_part)
  308.                         if part then
  309.                             local ePos, isVisible = Cam:WorldToViewportPoint(part.Position)
  310.                             local distance = (Vector2.new(ePos.x, ePos.y) - playerMousePos).Magnitude
  311.    
  312.                             if distance < last and isVisible and distance < fov and distance < maxDistance then
  313.                                 last = distance
  314.                                 nearest = player
  315.                             end
  316.                         end
  317.                     end
  318.                 end
  319.             end
  320.    
  321.             return nearest
  322.         end
  323.    
  324.         local function toggleTeamCheck()
  325.             teamCheck = not teamCheck
  326.         end
  327.    
  328.         toggleTeamCheck()
  329.         toggleTeamCheck()
  330.    
  331.         RunService.RenderStepped:Connect(function()
  332.             updateDrawings()
  333.             local closest = getClosestPlayerInFOV("Head")
  334.             if closest and closest.Character:FindFirstChild("Head") then
  335.                 lookAt(closest.Character.Head.Position)
  336.             end
  337.    
  338.             if closest then
  339.                 local ePos, isVisible = Cam:WorldToViewportPoint(closest.Character.Head.Position)
  340.                 local distance = (Vector2.new(ePos.x, ePos.y) - (Cam.ViewportSize / 2)).Magnitude
  341.                 FOVring.Transparency = calculateTransparency(distance)
  342.             else
  343.                 FOVring.Transparency = maxTransparency
  344.             end
  345.    
  346.             wait(0.03)
  347.         end)
  348.     end
  349.    
  350.     script.Parent.MouseButton1Click:Connect(onClicked)
  351. end
  352. coroutine.wrap(VDWL_fake_script)()
  353. local function JOOCJ_fake_script() -- Frame.LocalScript
  354.     local script = Instance.new('LocalScript', Frame)
  355.  
  356.     function dragify(Frame)
  357.         dragToggle = nil
  358.         dragSpeed = .25
  359.         dragInput = nil
  360.         dragStart = nil
  361.         dragPos = nil
  362.    
  363.         function updateInput(input)
  364.             Delta = input.Position - dragStart
  365.             Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + Delta.X, startPos.Y.Scale, startPos.Y.Offset + Delta.Y)
  366.             game:GetService("TweenService"):Create(Frame, TweenInfo.new(.25), {Position = Position}):Play()
  367.         end
  368.    
  369.         Frame.InputBegan:Connect(function(input)
  370.             if (input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch) then
  371.                 dragToggle = true
  372.                 dragStart = input.Position
  373.                 startPos = Frame.Position
  374.                 input.Changed:Connect(function()
  375.                     if (input.UserInputState == Enum.UserInputState.End) then
  376.                         dragToggle = false
  377.                     end
  378.                 end)
  379.             end
  380.         end)
  381.    
  382.         Frame.InputChanged:Connect(function(input)
  383.             if (input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch) then
  384.                 dragInput = input
  385.             end
  386.         end)
  387.    
  388.         game:GetService("UserInputService").InputChanged:Connect(function(input)
  389.             if (input == dragInput and dragToggle) then
  390.                 updateInput(input)
  391.             end
  392.         end)
  393.     end
  394.    
  395.     dragify(script.Parent)
  396. end
  397. coroutine.wrap(JOOCJ_fake_script)()
  398. local function UGNL_fake_script() -- CrosshairProject.Tween
  399.     local script = Instance.new('LocalScript', CrosshairProject)
  400.  
  401.     local Frame = script.Parent.Frame
  402.     local cross = script.Parent.Crosshair
  403.     local aud = Instance.new("Sound", game.ReplicatedStorage)
  404.     local message = "Script ready✓"
  405.    
  406.     aud.SoundId = "rbxassetid://2722743533"
  407.     aud:Play()
  408.    
  409.     local function callback(didComplete)
  410.         if didComplete then
  411.             aud.SoundId = "rbxassetid://1524543584"
  412.             aud:Play()
  413.            
  414.             aud.Ended:Connect(function()
  415.                 aud:Destroy()
  416.                 game.StarterGui:SetCore("SendNotification", {
  417.                     Title = "Hi!",
  418.                     Text = message,
  419.                     Duration = 5
  420.                 })
  421.             end)
  422.         else
  423.             return print("Failed to tween.")
  424.         end
  425.     end
  426.    
  427.     Frame:TweenPosition(
  428.         UDim2.new(0, 41,0.5, 0),
  429.         "Out",
  430.         "Sine",
  431.         1
  432.     )
  433.    
  434.     cross:TweenSize(
  435.         UDim2.new(0, 50, 0 , 50),
  436.         "Out",
  437.         "Sine",
  438.         1,
  439.         false,
  440.         callback
  441.     )
  442. end
  443. coroutine.wrap(UGNL_fake_script)()
  444. local function DXBFEXD_fake_script() -- Source.LocalScript
  445.     local script = Instance.new('LocalScript', Source)
  446.  
  447.     local textBox = script.Parent
  448.     local decalPreview = textBox.Parent:FindFirstChild("DecalPreview")
  449.    
  450.     textBox.FocusLost:Connect(function()
  451.         local assetId = tonumber(textBox.Text)
  452.         if assetId then
  453.             decalPreview.Image = "rbxassetid://" .. assetId
  454.             script.Parent.Parent.AskUser.Visible = true
  455.            
  456.             game.StarterGui:SetCore("SendNotification", {
  457.                 Title = "Hi!",
  458.                 Text = "If decal not shows up then the ID is invalid.",
  459.                 Duration = 1
  460.             })
  461.         end
  462.     end)
  463.    
  464.     textBox.Focused:Connect(function()
  465.         script.Parent.Parent.AskUser.Visible = false
  466.     end)
  467.        
  468. end
  469. coroutine.wrap(DXBFEXD_fake_script)()
  470. local function NINW_fake_script() -- Source.MakingSure...
  471.     local script = Instance.new('LocalScript', Source)
  472.  
  473.     local textBox = script.Parent
  474.     local waitTime = math.random() * 10
  475.    
  476.     textBox.FocusLost:Connect(function(enterPressed)
  477.         if not enterPressed then
  478.             if not tonumber(textBox.Text) then
  479.                 textBox.Text = ""
  480.                 textBox.PlaceholderText = "Letters or symbols are not allowed!"
  481.                 wait(waitTime)
  482.                 textBox.PlaceholderText = "Enter Decal ID here..."
  483.             end
  484.         end
  485.     end)
  486. end
  487. coroutine.wrap(NINW_fake_script)()
  488. local function KTYJ_fake_script() -- Cancel.LocalScript
  489.     local script = Instance.new('LocalScript', Cancel)
  490.  
  491.     script.Parent.MouseButton1Click:Connect(function()
  492.         script.Parent.Parent:TweenPosition(
  493.             UDim2.new(0.5, 0, 2, 0),
  494.             "In",
  495.             "Sine",
  496.             1,
  497.             false
  498.         )
  499.     end)
  500. end
  501. coroutine.wrap(KTYJ_fake_script)()
  502. local function NCSBSOP_fake_script() -- Set.LocalScript
  503.     local script = Instance.new('LocalScript', Set)
  504.  
  505.     local DP = script.Parent.Parent.DecalPreview
  506.    
  507.     script.Parent.MouseButton1Click:Connect(function()
  508.         if DP.IsLoaded == true then
  509.             script.Parent.Parent.Parent.Crosshair.Image = script.Parent.Parent.DecalPreview.Image
  510.            
  511.             game.StarterGui:SetCore("SendNotification", {
  512.                 Title = "Hi!",
  513.                 Text = "Changed crosshair to " .. script.Parent.Parent.DecalPreview.Image,
  514.                 Duration = 5
  515.             })
  516.         end
  517.     end)
  518. end
  519. coroutine.wrap(NCSBSOP_fake_script)()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement