93 Views
Grátis
Descrição
Nenhuma descrição fornecida.
Tags
stateanarchyrobloxhitbox
Script Code
1-- Load OrionLib
2local OrionLib = loadstring(game:HttpGet("https://raw.githubusercontent.com/darkkcontrol/Roblox-Orion-UI-Libary-OP-UI-LIBARY-/refs/heads/main/source"))()
3
4-- Create the GUI Window
5local Window = OrionLib:MakeWindow({
6 Name = "Viper.gg SOA",
7 HidePremium = false,
8 SaveConfig = true,
9 ConfigFolder = "OrionTest"
10})
11
12-- Create Tabs
13local MainTab = Window:MakeTab({Name = "Main", Icon = "rbxassetid://4483345998", PremiumOnly = false})
14local VisualsTab = Window:MakeTab({Name = "Visuals", Icon = "rbxassetid://4483345998", PremiumOnly = false})
15local PlayerTab = Window:MakeTab({Name = "Player", Icon = "rbxassetid://4483345998", PremiumOnly = false})
16local SettingsTab = Window:MakeTab({Name = "Settings", Icon = "rbxassetid://4483345998", PremiumOnly = false})
17
18-- Add Sections
19local ESPSection = VisualsTab:AddSection({Name = "ESP"})
20local HitboxSection = VisualsTab:AddSection({Name = "Hitbox Expander"})
21
22-- Variables
23local ESPEnabled = false
24local ESPObjects = {}
25
26-- Function to Create ESP for a Player
27local function createESP(player)
28 -- Make sure the player has a character
29 local function setupCharacter(character)
30 if not character:FindFirstChild("HumanoidRootPart") or not character:FindFirstChild("Humanoid") then
31 -- Wait for essential parts to load
32 character:WaitForChild("HumanoidRootPart")
33 character:WaitForChild("Humanoid")
34 end
35
36 -- ESP Object
37 local ESP = {}
38
39 -- Box Outline
40 ESP.Box = Drawing.new("Square")
41 ESP.Box.Color = Color3.fromRGB(255, 0, 0) -- Red for enemies
42 ESP.Box.Thickness = 2
43 ESP.Box.Transparency = 1
44 ESP.Box.Filled = false
45
46 -- Player Name
47 ESP.Name = Drawing.new("Text")
48 ESP.Name.Text = player.Name
49 ESP.Name.Color = Color3.fromRGB(255, 255, 255)
50 ESP.Name.Size = 14
51 ESP.Name.Outline = true
52
53 -- Health Text
54 ESP.Health = Drawing.new("Text")
55 ESP.Health.Color = Color3.fromRGB(0, 255, 0) -- Green
56 ESP.Health.Size = 12
57 ESP.Health.Outline = true
58
59 -- Distance Text
60 ESP.Distance = Drawing.new("Text")
61 ESP.Distance.Color = Color3.fromRGB(255, 255, 0) -- Yellow
62 ESP.Distance.Size = 12
63 ESP.Distance.Outline = true
64
65 -- Add ESP to the table
66 ESPObjects[player] = ESP
67
68 -- Update ESP on RenderStepped
69 local updateConnection
70 updateConnection = game:GetService("RunService").RenderStepped:Connect(function()
71 -- Remove ESP if the player is no longer valid
72 if not ESPEnabled or not player.Character or not player.Character:FindFirstChild("HumanoidRootPart") or not player.Character:FindFirstChild("Humanoid") or player.Character.Humanoid.Health <= 0 then
73 if ESPObjects[player] then
74 ESPObjects[player].Box:Remove()
75 ESPObjects[player].Name:Remove()
76 ESPObjects[player].Health:Remove()
77 ESPObjects[player].Distance:Remove()
78 ESPObjects[player] = nil
79 end
80 updateConnection:Disconnect() -- Disconnect the update loop
81 return
82 end
83
84 -- Update ESP positions and visibility
85 local rootPart = character:FindFirstChild("HumanoidRootPart")
86 local humanoid = character:FindFirstChild("Humanoid")
87 local screenPos, onScreen = workspace.CurrentCamera:WorldToViewportPoint(rootPart.Position)
88 if onScreen then
89 -- Update Box Position and Size
90 local size = (workspace.CurrentCamera:WorldToViewportPoint(rootPart.Position + Vector3.new(3, 3, 0)) - workspace.CurrentCamera:WorldToViewportPoint(rootPart.Position - Vector3.new(3, 3, 0))).X
91 ESP.Box.Size = Vector2.new(size, size * 2)
92 ESP.Box.Position = Vector2.new(screenPos.X - size / 2, screenPos.Y - size)
93
94 -- Update Text Positions with spacing
95 ESP.Name.Position = Vector2.new(screenPos.X, screenPos.Y - size - 20) -- Name is at the top
96 ESP.Health.Position = Vector2.new(screenPos.X, screenPos.Y - size - 5) -- Health is below Name
97 ESP.Distance.Position = Vector2.new(screenPos.X, screenPos.Y + size + 5) -- Distance is below the Box
98
99 -- Update Text Values
100 ESP.Health.Text = "Health: " .. math.floor(humanoid.Health)
101 ESP.Distance.Text = "Distance: " .. math.floor((rootPart.Position - game.Players.LocalPlayer.Character.HumanoidRootPart.Position).Magnitude) .. " studs"
102
103 -- Show ESP
104 ESP.Box.Visible = true
105 ESP.Name.Visible = true
106 ESP.Health.Visible = true
107 ESP.Distance.Visible = true
108 else
109 -- Hide ESP
110 ESP.Box.Visible = false
111 ESP.Name.Visible = false
112 ESP.Health.Visible = false
113 ESP.Distance.Visible = false
114 end
115 end)
116 end
117
118 -- Handle case where player already has a character
119 if player.Character then
120 setupCharacter(player.Character)
121 end
122
123 -- Listen for the player's character being added
124 player.CharacterAdded:Connect(setupCharacter)
125end
126
127-- Function to Clear ESP for All Players
128local function clearESP()
129 for _, esp in pairs(ESPObjects) do
130 if esp.Box then esp.Box:Remove() end
131 if esp.Name then esp.Name:Remove() end
132 if esp.Health then esp.Health:Remove() end
133 if esp.Distance then esp.Distance:Remove() end
134 end
135 ESPObjects = {}
136end
137
138-- Function to Toggle ESP
139local function toggleESP(state)
140 ESPEnabled = state
141 if ESPEnabled then
142 -- Create ESP for existing players
143 for _, player in pairs(game:GetService("Players"):GetPlayers()) do
144 if player ~= game.Players.LocalPlayer then
145 createESP(player)
146 end
147 end
148
149 -- Listen for new players
150 game:GetService("Players").PlayerAdded:Connect(function(player)
151 createESP(player)
152 end)
153
154 -- Handle players leaving
155 game:GetService("Players").PlayerRemoving:Connect(function(player)
156 if ESPObjects[player] then
157 ESPObjects[player].Box:Remove()
158 ESPObjects[player].Name:Remove()
159 ESPObjects[player].Health:Remove()
160 ESPObjects[player].Distance:Remove()
161 ESPObjects[player] = nil
162 end
163 end)
164 else
165 clearESP()
166 end
167end
168
169-- GUI Integration
170ESPSection:AddToggle({
171 Name = "Enable ESP",
172 Default = false,
173 Callback = function(state)
174 toggleESP(state)
175 end
176})
177
178
179
180-- Variables
181local AimbotEnabled = false
182local FOV = 100 -- Default FOV size
183local Smoothness = 0.2 -- Default smoothness
184local AimbotKey = Enum.UserInputType.MouseButton2 -- Default key (Right Mouse Button)
185local HoldingKey = false -- Tracks whether the key is being held
186local BulletSpeed = 500 -- Default bullet speed (studs/second), adjust as needed for the game
187local FOVCircle
188
189-- Function to Create FOV Circle
190local function createFOVCircle()
191 FOVCircle = Drawing.new("Circle")
192 FOVCircle.Color = Color3.fromRGB(255, 255, 0) -- Yellow FOV Circle
193 FOVCircle.Thickness = 2
194 FOVCircle.Transparency = 1
195 FOVCircle.Radius = FOV
196 FOVCircle.Filled = false
197 FOVCircle.Visible = false -- Start as hidden
198end
199
200createFOVCircle()
201
202-- Function to Predict Target's Position
203local function predictTargetPosition(target, distance)
204 local velocity = target.Velocity or Vector3.zero -- Use target's velocity or default to zero
205 local travelTime = distance / BulletSpeed -- Calculate bullet travel time
206 return target.Position + (velocity * travelTime) -- Predicted position
207end
208
209-- Function to Find Closest Target
210local function getClosestTarget()
211 local closestTarget = nil
212 local closestDistance = FOV
213 local localPlayer = game.Players.LocalPlayer
214 local camera = workspace.CurrentCamera
215
216 for _, player in pairs(game:GetService("Players"):GetPlayers()) do
217 if player ~= localPlayer and player.Character and player.Character:FindFirstChild("HumanoidRootPart") and player.Character:FindFirstChild("Humanoid") then
218 local rootPart = player.Character.HumanoidRootPart
219 local screenPos, onScreen = camera:WorldToViewportPoint(rootPart.Position)
220 local mousePos = Vector2.new(camera.ViewportSize.X / 2, camera.ViewportSize.Y / 2) -- Center of screen
221 local distance = (Vector2.new(screenPos.X, screenPos.Y) - mousePos).Magnitude
222
223 if onScreen and distance < closestDistance and player.Character.Humanoid.Health > 0 then
224 closestDistance = distance
225 closestTarget = rootPart
226 end
227 end
228 end
229
230 return closestTarget, closestDistance
231end
232
233-- Smooth Aiming Function
234local function smoothAim(target, predictedPosition)
235 local camera = workspace.CurrentCamera
236 local mousePos = Vector2.new(camera.ViewportSize.X / 2, camera.ViewportSize.Y / 2) -- Center of screen
237 local targetScreenPos = camera:WorldToViewportPoint(predictedPosition)
238
239 local aimPos = Vector2.new(targetScreenPos.X, targetScreenPos.Y)
240 local newAimPos = mousePos:Lerp(aimPos, Smoothness)
241
242 mousemoverel(newAimPos.X - mousePos.X, newAimPos.Y - mousePos.Y)
243end
244
245-- Aimbot Update Function
246game:GetService("RunService").RenderStepped:Connect(function()
247 if AimbotEnabled and HoldingKey then
248 FOVCircle.Visible = true
249 FOVCircle.Position = Vector2.new(workspace.CurrentCamera.ViewportSize.X / 2, workspace.CurrentCamera.ViewportSize.Y / 2)
250
251 local target, distance = getClosestTarget()
252 if target then
253 local predictedPosition = predictTargetPosition(target, distance)
254 smoothAim(target, predictedPosition)
255 end
256 else
257 FOVCircle.Visible = false
258 end
259end)
260
261-- Key Input Handling
262game:GetService("UserInputService").InputBegan:Connect(function(input, gameProcessed)
263 if input.UserInputType == AimbotKey and not gameProcessed then
264 HoldingKey = true
265 end
266end)
267
268game:GetService("UserInputService").InputEnded:Connect(function(input, gameProcessed)
269 if input.UserInputType == AimbotKey and not gameProcessed then
270 HoldingKey = false
271 end
272end)
273
274-- GUI Integration
275local AimbotSection = MainTab:AddSection({Name = "Aimbot"})
276
277AimbotSection:AddToggle({
278 Name = "Enable Aimbot",
279 Default = false,
280 Callback = function(state)
281 AimbotEnabled = state
282 end
283})
284
285AimbotSection:AddSlider({
286 Name = "FOV Size",
287 Min = 50,
288 Max = 500,
289 Default = 100,
290 Color = Color3.fromRGB(255, 255, 0),
291 Increment = 1,
292 ValueName = "FOV",
293 Callback = function(value)
294 FOV = value
295 FOVCircle.Radius = FOV
296 end
297})
298
299AimbotSection:AddSlider({
300 Name = "Smoothness",
301 Min = 0.1,
302 Max = 1,
303 Default = 0.2,
304 Color = Color3.fromRGB(255, 255, 255),
305 Increment = 0.01,
306 ValueName = "Smoothness",
307 Callback = function(value)
308 Smoothness = value
309 end
310})
311
312AimbotSection:AddSlider({
313 Name = "Bullet Speed",
314 Min = 100,
315 Max = 1000,
316 Default = 500,
317 Increment = 10,
318 ValueName = "Speed",
319 Callback = function(value)
320 BulletSpeed = value
321 end
322})
323
324AimbotSection:AddDropdown({
325 Name = "Aimbot Key",
326 Default = "Right Mouse Button",
327 Options = {"Right Mouse Button", "Left Shift", "E", "Q"},
328 Callback = function(selected)
329 if selected == "Right Mouse Button" then
330 AimbotKey = Enum.UserInputType.MouseButton2
331 elseif selected == "Left Shift" then
332 AimbotKey = Enum.KeyCode.LeftShift
333 elseif selected == "E" then
334 AimbotKey = Enum.KeyCode.E
335 elseif selected == "Q" then
336 AimbotKey = Enum.KeyCode.Q
337 end
338 end
339})
340
341
342-- Function to Enable Fly
343local function enableFly()
344 Character = game.Players.LocalPlayer.Character
345 if not Character or not Character:FindFirstChild("HumanoidRootPart") then return end
346 Humanoid = Character:FindFirstChild("Humanoid")
347
348 -- Prevent character from falling
349 Humanoid.PlatformStand = true
350
351 -- Disable collisions
352 for _, part in pairs(Character:GetDescendants()) do
353 if part:IsA("BasePart") then
354 part.CanCollide = false
355 end
356 end
357
358 -- Create BodyGyro and BodyVelocity
359 BodyGyro = Instance.new("BodyGyro")
360 BodyGyro.P = 9e4
361 BodyGyro.CFrame = Character.HumanoidRootPart.CFrame
362 BodyGyro.MaxTorque = Vector3.new(9e9, 9e9, 9e9)
363 BodyGyro.Parent = Character.HumanoidRootPart
364
365 BodyVelocity = Instance.new("BodyVelocity")
366 BodyVelocity.Velocity = Vector3.zero
367 BodyVelocity.MaxForce = Vector3.new(9e9, 9e9, 9e9)
368 BodyVelocity.Parent = Character.HumanoidRootPart
369
370 FlyEnabled = true
371end
372
373-- Function to Disable Fly
374local function disableFly()
375 if not FlyEnabled then return end
376
377 -- Restore character state
378 if BodyGyro then BodyGyro:Destroy() end
379 if BodyVelocity then BodyVelocity:Destroy() end
380 if Humanoid then Humanoid.PlatformStand = false end
381
382 -- Re-enable collisions
383 for _, part in pairs(Character:GetDescendants()) do
384 if part:IsA("BasePart") then
385 part.CanCollide = true
386 end
387 end
388
389 FlyEnabled = false
390end
391
392-- Handle Fly Movement
393game:GetService("RunService").Stepped:Connect(function()
394 if FlyEnabled and Character and Character:FindFirstChild("HumanoidRootPart") then
395 local moveDirection = Vector3.zero
396 local camera = workspace.CurrentCamera
397
398 -- Move with W, A, S, D
399 if game:GetService("UserInputService"):IsKeyDown(Enum.KeyCode.W) then
400 moveDirection += camera.CFrame.LookVector
401 end
402 if game:GetService("UserInputService"):IsKeyDown(Enum.KeyCode.S) then
403 moveDirection -= camera.CFrame.LookVector
404 end
405 if game:GetService("UserInputService"):IsKeyDown(Enum.KeyCode.A) then
406 moveDirection -= camera.CFrame.RightVector
407 end
408 if game:GetService("UserInputService"):IsKeyDown(Enum.KeyCode.D) then
409 moveDirection += camera.CFrame.RightVector
410 end
411
412 -- Elevate with Space and Shift
413 if game:GetService("UserInputService"):IsKeyDown(Enum.KeyCode.Space) then
414 moveDirection += Vector3.new(0, 1, 0)
415 end
416 if game:GetService("UserInputService"):IsKeyDown(Enum.KeyCode.LeftShift) then
417 moveDirection -= Vector3.new(0, 1, 0)
418 end
419
420 -- Apply Movement
421 if moveDirection.Magnitude > 0 then
422 BodyGyro.CFrame = camera.CFrame
423 BodyVelocity.Velocity = moveDirection.Unit * FlySpeed
424 else
425 BodyVelocity.Velocity = Vector3.zero
426 end
427 end
428end)
429
430-- GUI Integration
431local MovementSection = PlayerTab:AddSection({Name = "Movement"})
432
433-- Fly Toggle
434MovementSection:AddToggle({
435 Name = "Enable Fly",
436 Default = false,
437 Callback = function(state)
438 if state then
439 enableFly()
440 else
441 disableFly()
442 end
443 end
444})
445
446-- Fly Speed Slider
447MovementSection:AddSlider({
448 Name = "Fly Speed",
449 Min = 10,
450 Max = 200,
451 Default = 50,
452 Color = Color3.fromRGB(255, 255, 255),
453 Increment = 1,
454 ValueName = "Speed",
455 Callback = function(value)
456 FlySpeed = value
457 end
458})
459
460-- Zoom Logic
461local CameraKey = Enum.KeyCode.LeftControl -- Default zoom key
462local ZoomLevel = 30 -- Default zoom level
463local NormalZoom = 70 -- Default normal FOV
464local IsZooming = false -- Tracks whether the zoom key is held
465
466-- Function to Continuously Enforce Zoom
467local function enforceZoom()
468 while IsZooming do
469 workspace.CurrentCamera.FieldOfView = ZoomLevel
470 wait() -- Prevents freezing the game
471 end
472 workspace.CurrentCamera.FieldOfView = NormalZoom -- Reset FOV when zoom ends
473end
474
475-- Key Input Handling
476game:GetService("UserInputService").InputBegan:Connect(function(input, gameProcessed)
477 if input.KeyCode == CameraKey and not gameProcessed then
478 IsZooming = true
479 enforceZoom()
480 end
481end)
482
483game:GetService("UserInputService").InputEnded:Connect(function(input, gameProcessed)
484 if input.KeyCode == CameraKey and not gameProcessed then
485 IsZooming = false
486 end
487end)
488
489-- GUI Integration for Zoom Control
490local CameraSection = SettingsTab:AddSection({Name = "Camera Control"})
491
492CameraSection:AddDropdown({
493 Name = "Zoom Key",
494 Default = "Left Control",
495 Options = {"Left Control", "Right Control", "Z", "X"},
496 Callback = function(selected)
497 if selected == "Left Control" then
498 CameraKey = Enum.KeyCode.LeftControl
499 elseif selected == "Right Control" then
500 CameraKey = Enum.KeyCode.RightControl
501 elseif selected == "Z" then
502 CameraKey = Enum.KeyCode.Z
503 elseif selected == "X" then
504 CameraKey = Enum.KeyCode.X
505 end
506 end
507})
508
509CameraSection:AddSlider({
510 Name = "Zoom Level",
511 Min = 10,
512 Max = 100,
513 Default = 30,
514 Color = Color3.fromRGB(255, 255, 255),
515 Increment = 1,
516 ValueName = "Zoom",
517 Callback = function(value)
518 ZoomLevel = value
519 end
520})
521
522CameraSection:AddSlider({
523 Name = "Normal Zoom",
524 Min = 60,
525 Max = 120,
526 Default = 70,
527 Color = Color3.fromRGB(255, 255, 255),
528 Increment = 1,
529 ValueName = "FOV",
530 Callback = function(value)
531 NormalZoom = value
532 end
533})
534
535local TriggerbotEnabled = false
536local Debounce = false -- Prevents spamming
537local DebounceTime = 0.1 -- Time between clicks (in seconds)
538
539-- Function to Check for Valid Target
540local function isValidTarget(target)
541 if not target or not target.Parent then return false end
542 local character = target.Parent
543 local humanoid = character:FindFirstChild("Humanoid")
544 local rootPart = character:FindFirstChild("HumanoidRootPart")
545
546 if humanoid and rootPart and humanoid.Health > 0 then
547 local camera = workspace.CurrentCamera
548 local screenPos, onScreen = camera:WorldToViewportPoint(rootPart.Position)
549 return onScreen -- Ensure the target is visible on the screen
550 end
551
552 return false
553end
554
555-- Function to Trigger Fire
556local function triggerFire()
557 if Debounce then return end
558 Debounce = true
559
560 local mouse = game.Players.LocalPlayer:GetMouse()
561 local target = mouse.Target
562
563 if isValidTarget(target) then
564 mouse1click() -- Simulates a left mouse button click
565 end
566
567 -- Debounce cooldown
568 task.wait(DebounceTime)
569 Debounce = false
570end
571
572-- Continuous Update for Triggerbot
573game:GetService("RunService").RenderStepped:Connect(function()
574 if TriggerbotEnabled then
575 local mouse = game.Players.LocalPlayer:GetMouse()
576 if mouse.Target and isValidTarget(mouse.Target) then
577 triggerFire()
578 end
579 end
580end)
581
582-- GUI Integration for Triggerbot
583local TriggerbotSection = MainTab:AddSection({Name = "Triggerbot"})
584
585TriggerbotSection:AddToggle({
586 Name = "Enable Triggerbot",
587 Default = false,
588 Callback = function(state)
589 TriggerbotEnabled = state
590 end
591})
592
593TriggerbotSection:AddSlider({
594 Name = "Trigger Cooldown",
595 Min = 0.05,
596 Max = 1,
597 Default = 0.1,
598 Increment = 0.01,
599 ValueName = "Seconds",
600 Callback = function(value)
601 DebounceTime = value
602 end
603})
604
605-- Hitbox Expander Variables
606local HitboxEnabled = false
607local HitboxSizeMultiplier = Vector3.new(5, 5, 5) -- Default multiplier
608local HitboxTransparency = 0.5 -- Default transparency
609local OriginalSizes = {} -- Store original sizes
610
611-- Function to Expand Hitboxes for a Player
612local function expandHitboxes(player)
613 if player.Character and player.Character:FindFirstChild("HumanoidRootPart") then
614 for _, part in ipairs(player.Character:GetChildren()) do
615 if part:IsA("BasePart") and part.Name ~= "HumanoidRootPart" then
616 if not OriginalSizes[part] then
617 OriginalSizes[part] = part.Size -- Save original size
618 end
619 part.Size = OriginalSizes[part] * HitboxSizeMultiplier
620 part.Transparency = HitboxTransparency
621 part.CanCollide = false -- Optional: prevent collision issues
622 end
623 end
624 end
625end
626
627-- Function to Restore Hitboxes for a Player
628local function restoreHitboxes(player)
629 if player.Character and player.Character:FindFirstChild("HumanoidRootPart") then
630 for _, part in ipairs(player.Character:GetChildren()) do
631 if part:IsA("BasePart") and part.Name ~= "HumanoidRootPart" then
632 if OriginalSizes[part] then
633 part.Size = OriginalSizes[part]
634 part.Transparency = 0 -- Reset transparency
635 part.CanCollide = true
636 end
637 end
638 end
639 end
640end
641
642-- Function to Toggle Hitbox Expander for All Players
643local function toggleHitboxExpander(state)
644 HitboxEnabled = state
645 if HitboxEnabled then
646 for _, player in pairs(game.Players:GetPlayers()) do
647 if player ~= game.Players.LocalPlayer then
648 expandHitboxes(player)
649 end
650 end
651
652 -- Listen for new players joining
653 game.Players.PlayerAdded:Connect(function(player)
654 player.CharacterAdded:Connect(function()
655 expandHitboxes(player)
656 end)
657 end)
658 else
659 for _, player in pairs(game.Players:GetPlayers()) do
660 if player ~= game.Players.LocalPlayer then
661 restoreHitboxes(player)
662 end
663 end
664 end
665end
666
667HitboxSection:AddToggle({
668 Name = "Enable Hitbox Expander",
669 Default = false,
670 Callback = function(state)
671 toggleHitboxExpander(state)
672 end
673})
674
675HitboxSection:AddSlider({
676 Name = "Hitbox Size Multiplier",
677 Min = 1,
678 Max = 10,
679 Default = 5,
680 Increment = 0.1,
681 Callback = function(value)
682 HitboxSizeMultiplier = Vector3.new(value, value, value)
683 if HitboxEnabled then
684 for _, player in pairs(game.Players:GetPlayers()) do
685 if player ~= game.Players.LocalPlayer then
686 expandHitboxes(player)
687 end
688 end
689 end
690 end
691})
692
693HitboxSection:AddSlider({
694 Name = "Hitbox Transparency",
695 Min = 0,
696 Max = 1,
697 Default = 0.5,
698 Increment = 0.1,
699 Callback = function(value)
700 HitboxTransparency = value
701 if HitboxEnabled then
702 for _, player in pairs(game.Players:GetPlayers()) do
703 if player ~= game.Players.LocalPlayer and player.Character then
704 for _, part in ipairs(player.Character:GetChildren()) do
705 if part:IsA("BasePart") and part.Name ~= "HumanoidRootPart" then
706 part.Transparency = HitboxTransparency
707 end
708 end
709 end
710 end
711 end
712 end
713})
714
715--Chams
716local ChamsEnabled = false
717local Highlights = {} -- Store highlights for each player
718
719-- Function to Add Chams to a Player
720local function addChams(player)
721 if player.Character and player.Character:FindFirstChild("HumanoidRootPart") then
722 -- Check if the Highlight already exists
723 if not Highlights[player] then
724 local highlight = Instance.new("Highlight")
725 highlight.FillColor = Color3.fromRGB(255, 0, 0) -- Default Red
726 highlight.FillTransparency = 0.5 -- Semi-transparent fill
727 highlight.OutlineColor = Color3.fromRGB(255, 255, 255) -- Default White
728 highlight.OutlineTransparency = 0 -- Fully visible outline
729 highlight.Adornee = player.Character -- Attach to player's character
730 highlight.Parent = game:GetService("CoreGui") -- Parent it to CoreGui for visibility
731 Highlights[player] = highlight
732 end
733 end
734end
735
736-- Function to Remove Chams from a Player
737local function removeChams(player)
738 if Highlights[player] then
739 Highlights[player]:Destroy()
740 Highlights[player] = nil
741 end
742end
743
744-- Function to Toggle Chams for All Players
745local function toggleChams(state)
746 ChamsEnabled = state
747 if ChamsEnabled then
748 for _, player in pairs(game.Players:GetPlayers()) do
749 if player ~= game.Players.LocalPlayer then
750 addChams(player)
751 end
752 end
753
754 -- Handle new players joining
755 game.Players.PlayerAdded:Connect(function(player)
756 addChams(player)
757 end)
758
759 -- Handle players leaving
760 game.Players.PlayerRemoving:Connect(function(player)
761 removeChams(player)
762 end)
763 else
764 -- Disable Chams for all players
765 for _, player in pairs(Highlights) do
766 removeChams(player)
767 end
768 end
769end
770
771-- GUI Integration for Chams
772local ChamsSection = VisualsTab:AddSection({Name = "Chams"})
773
774ChamsSection:AddToggle({
775 Name = "Enable Chams",
776 Default = false,
777 Callback = function(state)
778 toggleChams(state)
779 end
780})
781
782ChamsSection:AddColorPicker({
783 Name = "Fill Color",
784 Default = Color3.fromRGB(255, 0, 0),
785 Callback = function(color)
786 for _, highlight in pairs(Highlights) do
787 highlight.FillColor = color
788 end
789 end
790})
791
792ChamsSection:AddColorPicker({
793 Name = "Outline Color",
794 Default = Color3.fromRGB(255, 255, 255),
795 Callback = function(color)
796 for _, highlight in pairs(Highlights) do
797 highlight.OutlineColor = color
798 end
799 end
800})
801
802ChamsSection:AddSlider({
803 Name = "Fill Transparency",
804 Min = 0,
805 Max = 1,
806 Default = 0.5,
807 Increment = 0.01,
808 Callback = function(value)
809 for _, highlight in pairs(Highlights) do
810 highlight.FillTransparency = value
811 end
812 end
813})
814
815ChamsSection:AddSlider({
816 Name = "Outline Transparency",
817 Min = 0,
818 Max = 1,
819 Default = 0,
820 Increment = 0.01,
821 Callback = function(value)
822 for _, highlight in pairs(Highlights) do
823 highlight.OutlineTransparency = value
824 end
825 end
826})
827