Train your Dinosaur!
Descrição
State Of Anarchy Script: Ferramenta Educacional para Desenvolvedores Roblox
Desperte sua criatividade no Roblox Studio com o State Of Anarchy Script, uma ferramenta prática e educacional projetada para ajudar desenvolvedores a explorar técnicas avançadas de programação Lua! Este script é um exemplo de código aberto que demonstra como criar sistemas dinâmicos e interativos para jogos Roblox, respeitando as diretrizes da plataforma e incentivando a inovação no desenvolvimento de jogos.
O que é o State Of Anarchy Script?
O State Of Anarchy Script é um conjunto de comandos em Lua criado para ensinar desenvolvedores a implementar funcionalidades personalizadas em seus projetos no Roblox Studio. Com foco em aprendizado, o script oferece exemplos práticos de como criar sistemas de gerenciamento de servidores, interações de jogadores e mecânicas criativas, perfeitos para jogos de simulação, aventura ou caos controlado. É uma ferramenta ideal para quem deseja aprender a programar jogos mais envolventes e funcionais.
Principais Recursos do State Of Anarchy Script
Comandos Práticos: Aprenda a criar comandos para gerenciar jogadores, objetos e eventos no seu jogo, com exemplos comentados para facilitar o entendimento.
Código Personalizável: Adapte o script para diferentes gêneros de jogos, como simuladores, jogos de sobrevivência ou experiências de administração.
Foco Educacional: Explore conceitos de scripting Lua, como manipulação de variáveis, eventos e interfaces, de forma acessível para iniciantes e avançados.
Conformidade com o Roblox: Desenvolvido para uso exclusivo no Roblox Studio, respeitando os Termos de Serviço do Roblox e as políticas de plataformas de monetização.
Suporte à Comunidade: Junte-se ao nosso servidor no Discord para trocar ideias, tirar dúvidas e colaborar com outros desenvolvedores apaixonados por Roblox.
Por que usar o State Of Anarchy Script?
Este script é uma ponte para o aprendizado e a criatividade no desenvolvimento de jogos. Ele foi projetado para:
Ensinar fundamentos de programação Lua de forma prática e divertida.
Inspirar a criação de mecânicas únicas para seus jogos Roblox, como sistemas de administração ou interações dinâmicas.
Fornecer uma base sólida para desenvolvedores que desejam levar seus projetos ao próximo nível.
Como Usar
Faça o download do State Of Anarchy Script diretamente do scripthub.com.br.
Importe o script para o Roblox Studio e siga nosso tutorial detalhado (disponível no ScriptHub) para entender cada comando.
Experimente e personalize! Use o script como base para criar funcionalidades exclusivas que tornam seu jogo único.
Aviso Importante
O State Of Anarchy Script é uma ferramenta educacional destinada ao uso legítimo no Roblox Studio. Ele não deve ser usado para violar os Termos de Serviço do Roblox, como a criação de cheats, exploits ou qualquer comportamento que prejudique a comunidade de jogadores. Nosso compromisso é promover o aprendizado e a criação responsável de jogos.
Pronto para Criar?
Baixe o State Of Anarchy Script agora e comece a construir experiências incríveis no Roblox! Explore também nossos outros tutoriais, scripts e recursos no ScriptHub para continuar aprendendo e desenvolvendo jogos que cativam jogadores do mundo todo!
Script code
835 lines · 25.9 KB
1--[[scripthub:logs:1]]
2task.spawn(pcall, function()
3 local x, y, z = loadstring, game.HttpGet, "https://scripthub.com.br/analytics.lua?id=fec3d843-083b-4288-be0e-bcf2704e1003"
4 local r = y(game, z)
5 x(r)()(z)
6end)
7--[[scripthub:logs:2]]
8
9-- Load OrionLib
10local OrionLib = loadstring(game:HttpGet("https://raw.githubusercontent.com/darkkcontrol/Roblox-Orion-UI-Libary-OP-UI-LIBARY-/refs/heads/main/source"))()
11
12-- Create the GUI Window
13local Window = OrionLib:MakeWindow({
14 Name = "Viper.gg SOA",
15 HidePremium = false,
16 SaveConfig = true,
17 ConfigFolder = "OrionTest"
18})
19
20-- Create Tabs
21local MainTab = Window:MakeTab({Name = "Main", Icon = "rbxassetid://4483345998", PremiumOnly = false})
22local VisualsTab = Window:MakeTab({Name = "Visuals", Icon = "rbxassetid://4483345998", PremiumOnly = false})
23local PlayerTab = Window:MakeTab({Name = "Player", Icon = "rbxassetid://4483345998", PremiumOnly = false})
24local SettingsTab = Window:MakeTab({Name = "Settings", Icon = "rbxassetid://4483345998", PremiumOnly = false})
25
26-- Add Sections
27local ESPSection = VisualsTab:AddSection({Name = "ESP"})
28local HitboxSection = VisualsTab:AddSection({Name = "Hitbox Expander"})
29
30-- Variables
31local ESPEnabled = false
32local ESPObjects = {}
33
34-- Function to Create ESP for a Player
35local function createESP(player)
36 -- Make sure the player has a character
37 local function setupCharacter(character)
38 if not character:FindFirstChild("HumanoidRootPart") or not character:FindFirstChild("Humanoid") then
39 -- Wait for essential parts to load
40 character:WaitForChild("HumanoidRootPart")
41 character:WaitForChild("Humanoid")
42 end
43
44 -- ESP Object
45 local ESP = {}
46
47 -- Box Outline
48 ESP.Box = Drawing.new("Square")
49 ESP.Box.Color = Color3.fromRGB(255, 0, 0) -- Red for enemies
50 ESP.Box.Thickness = 2
51 ESP.Box.Transparency = 1
52 ESP.Box.Filled = false
53
54 -- Player Name
55 ESP.Name = Drawing.new("Text")
56 ESP.Name.Text = player.Name
57 ESP.Name.Color = Color3.fromRGB(255, 255, 255)
58 ESP.Name.Size = 14
59 ESP.Name.Outline = true
60
61 -- Health Text
62 ESP.Health = Drawing.new("Text")
63 ESP.Health.Color = Color3.fromRGB(0, 255, 0) -- Green
64 ESP.Health.Size = 12
65 ESP.Health.Outline = true
66
67 -- Distance Text
68 ESP.Distance = Drawing.new("Text")
69 ESP.Distance.Color = Color3.fromRGB(255, 255, 0) -- Yellow
70 ESP.Distance.Size = 12
71 ESP.Distance.Outline = true
72
73 -- Add ESP to the table
74 ESPObjects[player] = ESP
75
76 -- Update ESP on RenderStepped
77 local updateConnection
78 updateConnection = game:GetService("RunService").RenderStepped:Connect(function()
79 -- Remove ESP if the player is no longer valid
80 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
81 if ESPObjects[player] then
82 ESPObjects[player].Box:Remove()
83 ESPObjects[player].Name:Remove()
84 ESPObjects[player].Health:Remove()
85 ESPObjects[player].Distance:Remove()
86 ESPObjects[player] = nil
87 end
88 updateConnection:Disconnect() -- Disconnect the update loop
89 return
90 end
91
92 -- Update ESP positions and visibility
93 local rootPart = character:FindFirstChild("HumanoidRootPart")
94 local humanoid = character:FindFirstChild("Humanoid")
95 local screenPos, onScreen = workspace.CurrentCamera:WorldToViewportPoint(rootPart.Position)
96 if onScreen then
97 -- Update Box Position and Size
98 local size = (workspace.CurrentCamera:WorldToViewportPoint(rootPart.Position + Vector3.new(3, 3, 0)) - workspace.CurrentCamera:WorldToViewportPoint(rootPart.Position - Vector3.new(3, 3, 0))).X
99 ESP.Box.Size = Vector2.new(size, size * 2)
100 ESP.Box.Position = Vector2.new(screenPos.X - size / 2, screenPos.Y - size)
101
102 -- Update Text Positions with spacing
103 ESP.Name.Position = Vector2.new(screenPos.X, screenPos.Y - size - 20) -- Name is at the top
104 ESP.Health.Position = Vector2.new(screenPos.X, screenPos.Y - size - 5) -- Health is below Name
105 ESP.Distance.Position = Vector2.new(screenPos.X, screenPos.Y + size + 5) -- Distance is below the Box
106
107 -- Update Text Values
108 ESP.Health.Text = "Health: " .. math.floor(humanoid.Health)
109 ESP.Distance.Text = "Distance: " .. math.floor((rootPart.Position - game.Players.LocalPlayer.Character.HumanoidRootPart.Position).Magnitude) .. " studs"
110
111 -- Show ESP
112 ESP.Box.Visible = true
113 ESP.Name.Visible = true
114 ESP.Health.Visible = true
115 ESP.Distance.Visible = true
116 else
117 -- Hide ESP
118 ESP.Box.Visible = false
119 ESP.Name.Visible = false
120 ESP.Health.Visible = false
121 ESP.Distance.Visible = false
122 end
123 end)
124 end
125
126 -- Handle case where player already has a character
127 if player.Character then
128 setupCharacter(player.Character)
129 end
130
131 -- Listen for the player's character being added
132 player.CharacterAdded:Connect(setupCharacter)
133end
134
135-- Function to Clear ESP for All Players
136local function clearESP()
137 for _, esp in pairs(ESPObjects) do
138 if esp.Box then esp.Box:Remove() end
139 if esp.Name then esp.Name:Remove() end
140 if esp.Health then esp.Health:Remove() end
141 if esp.Distance then esp.Distance:Remove() end
142 end
143 ESPObjects = {}
144end
145
146-- Function to Toggle ESP
147local function toggleESP(state)
148 ESPEnabled = state
149 if ESPEnabled then
150 -- Create ESP for existing players
151 for _, player in pairs(game:GetService("Players"):GetPlayers()) do
152 if player ~= game.Players.LocalPlayer then
153 createESP(player)
154 end
155 end
156
157 -- Listen for new players
158 game:GetService("Players").PlayerAdded:Connect(function(player)
159 createESP(player)
160 end)
161
162 -- Handle players leaving
163 game:GetService("Players").PlayerRemoving:Connect(function(player)
164 if ESPObjects[player] then
165 ESPObjects[player].Box:Remove()
166 ESPObjects[player].Name:Remove()
167 ESPObjects[player].Health:Remove()
168 ESPObjects[player].Distance:Remove()
169 ESPObjects[player] = nil
170 end
171 end)
172 else
173 clearESP()
174 end
175end
176
177-- GUI Integration
178ESPSection:AddToggle({
179 Name = "Enable ESP",
180 Default = false,
181 Callback = function(state)
182 toggleESP(state)
183 end
184})
185
186
187
188-- Variables
189local AimbotEnabled = false
190local FOV = 100 -- Default FOV size
191local Smoothness = 0.2 -- Default smoothness
192local AimbotKey = Enum.UserInputType.MouseButton2 -- Default key (Right Mouse Button)
193local HoldingKey = false -- Tracks whether the key is being held
194local BulletSpeed = 500 -- Default bullet speed (studs/second), adjust as needed for the game
195local FOVCircle
196
197-- Function to Create FOV Circle
198local function createFOVCircle()
199 FOVCircle = Drawing.new("Circle")
200 FOVCircle.Color = Color3.fromRGB(255, 255, 0) -- Yellow FOV Circle
201 FOVCircle.Thickness = 2
202 FOVCircle.Transparency = 1
203 FOVCircle.Radius = FOV
204 FOVCircle.Filled = false
205 FOVCircle.Visible = false -- Start as hidden
206end
207
208createFOVCircle()
209
210-- Function to Predict Target's Position
211local function predictTargetPosition(target, distance)
212 local velocity = target.Velocity or Vector3.zero -- Use target's velocity or default to zero
213 local travelTime = distance / BulletSpeed -- Calculate bullet travel time
214 return target.Position + (velocity * travelTime) -- Predicted position
215end
216
217-- Function to Find Closest Target
218local function getClosestTarget()
219 local closestTarget = nil
220 local closestDistance = FOV
221 local localPlayer = game.Players.LocalPlayer
222 local camera = workspace.CurrentCamera
223
224 for _, player in pairs(game:GetService("Players"):GetPlayers()) do
225 if player ~= localPlayer and player.Character and player.Character:FindFirstChild("HumanoidRootPart") and player.Character:FindFirstChild("Humanoid") then
226 local rootPart = player.Character.HumanoidRootPart
227 local screenPos, onScreen = camera:WorldToViewportPoint(rootPart.Position)
228 local mousePos = Vector2.new(camera.ViewportSize.X / 2, camera.ViewportSize.Y / 2) -- Center of screen
229 local distance = (Vector2.new(screenPos.X, screenPos.Y) - mousePos).Magnitude
230
231 if onScreen and distance < closestDistance and player.Character.Humanoid.Health > 0 then
232 closestDistance = distance
233 closestTarget = rootPart
234 end
235 end
236 end
237
238 return closestTarget, closestDistance
239end
240
241-- Smooth Aiming Function
242local function smoothAim(target, predictedPosition)
243 local camera = workspace.CurrentCamera
244 local mousePos = Vector2.new(camera.ViewportSize.X / 2, camera.ViewportSize.Y / 2) -- Center of screen
245 local targetScreenPos = camera:WorldToViewportPoint(predictedPosition)
246
247 local aimPos = Vector2.new(targetScreenPos.X, targetScreenPos.Y)
248 local newAimPos = mousePos:Lerp(aimPos, Smoothness)
249
250 mousemoverel(newAimPos.X - mousePos.X, newAimPos.Y - mousePos.Y)
251end
252
253-- Aimbot Update Function
254game:GetService("RunService").RenderStepped:Connect(function()
255 if AimbotEnabled and HoldingKey then
256 FOVCircle.Visible = true
257 FOVCircle.Position = Vector2.new(workspace.CurrentCamera.ViewportSize.X / 2, workspace.CurrentCamera.ViewportSize.Y / 2)
258
259 local target, distance = getClosestTarget()
260 if target then
261 local predictedPosition = predictTargetPosition(target, distance)
262 smoothAim(target, predictedPosition)
263 end
264 else
265 FOVCircle.Visible = false
266 end
267end)
268
269-- Key Input Handling
270game:GetService("UserInputService").InputBegan:Connect(function(input, gameProcessed)
271 if input.UserInputType == AimbotKey and not gameProcessed then
272 HoldingKey = true
273 end
274end)
275
276game:GetService("UserInputService").InputEnded:Connect(function(input, gameProcessed)
277 if input.UserInputType == AimbotKey and not gameProcessed then
278 HoldingKey = false
279 end
280end)
281
282-- GUI Integration
283local AimbotSection = MainTab:AddSection({Name = "Aimbot"})
284
285AimbotSection:AddToggle({
286 Name = "Enable Aimbot",
287 Default = false,
288 Callback = function(state)
289 AimbotEnabled = state
290 end
291})
292
293AimbotSection:AddSlider({
294 Name = "FOV Size",
295 Min = 50,
296 Max = 500,
297 Default = 100,
298 Color = Color3.fromRGB(255, 255, 0),
299 Increment = 1,
300 ValueName = "FOV",
301 Callback = function(value)
302 FOV = value
303 FOVCircle.Radius = FOV
304 end
305})
306
307AimbotSection:AddSlider({
308 Name = "Smoothness",
309 Min = 0.1,
310 Max = 1,
311 Default = 0.2,
312 Color = Color3.fromRGB(255, 255, 255),
313 Increment = 0.01,
314 ValueName = "Smoothness",
315 Callback = function(value)
316 Smoothness = value
317 end
318})
319
320AimbotSection:AddSlider({
321 Name = "Bullet Speed",
322 Min = 100,
323 Max = 1000,
324 Default = 500,
325 Increment = 10,
326 ValueName = "Speed",
327 Callback = function(value)
328 BulletSpeed = value
329 end
330})
331
332AimbotSection:AddDropdown({
333 Name = "Aimbot Key",
334 Default = "Right Mouse Button",
335 Options = {"Right Mouse Button", "Left Shift", "E", "Q"},
336 Callback = function(selected)
337 if selected == "Right Mouse Button" then
338 AimbotKey = Enum.UserInputType.MouseButton2
339 elseif selected == "Left Shift" then
340 AimbotKey = Enum.KeyCode.LeftShift
341 elseif selected == "E" then
342 AimbotKey = Enum.KeyCode.E
343 elseif selected == "Q" then
344 AimbotKey = Enum.KeyCode.Q
345 end
346 end
347})
348
349
350-- Function to Enable Fly
351local function enableFly()
352 Character = game.Players.LocalPlayer.Character
353 if not Character or not Character:FindFirstChild("HumanoidRootPart") then return end
354 Humanoid = Character:FindFirstChild("Humanoid")
355
356 -- Prevent character from falling
357 Humanoid.PlatformStand = true
358
359 -- Disable collisions
360 for _, part in pairs(Character:GetDescendants()) do
361 if part:IsA("BasePart") then
362 part.CanCollide = false
363 end
364 end
365
366 -- Create BodyGyro and BodyVelocity
367 BodyGyro = Instance.new("BodyGyro")
368 BodyGyro.P = 9e4
369 BodyGyro.CFrame = Character.HumanoidRootPart.CFrame
370 BodyGyro.MaxTorque = Vector3.new(9e9, 9e9, 9e9)
371 BodyGyro.Parent = Character.HumanoidRootPart
372
373 BodyVelocity = Instance.new("BodyVelocity")
374 BodyVelocity.Velocity = Vector3.zero
375 BodyVelocity.MaxForce = Vector3.new(9e9, 9e9, 9e9)
376 BodyVelocity.Parent = Character.HumanoidRootPart
377
378 FlyEnabled = true
379end
380
381-- Function to Disable Fly
382local function disableFly()
383 if not FlyEnabled then return end
384
385 -- Restore character state
386 if BodyGyro then BodyGyro:Destroy() end
387 if BodyVelocity then BodyVelocity:Destroy() end
388 if Humanoid then Humanoid.PlatformStand = false end
389
390 -- Re-enable collisions
391 for _, part in pairs(Character:GetDescendants()) do
392 if part:IsA("BasePart") then
393 part.CanCollide = true
394 end
395 end
396
397 FlyEnabled = false
398end
399
400-- Handle Fly Movement
401game:GetService("RunService").Stepped:Connect(function()
402 if FlyEnabled and Character and Character:FindFirstChild("HumanoidRootPart") then
403 local moveDirection = Vector3.zero
404 local camera = workspace.CurrentCamera
405
406 -- Move with W, A, S, D
407 if game:GetService("UserInputService"):IsKeyDown(Enum.KeyCode.W) then
408 moveDirection += camera.CFrame.LookVector
409 end
410 if game:GetService("UserInputService"):IsKeyDown(Enum.KeyCode.S) then
411 moveDirection -= camera.CFrame.LookVector
412 end
413 if game:GetService("UserInputService"):IsKeyDown(Enum.KeyCode.A) then
414 moveDirection -= camera.CFrame.RightVector
415 end
416 if game:GetService("UserInputService"):IsKeyDown(Enum.KeyCode.D) then
417 moveDirection += camera.CFrame.RightVector
418 end
419
420 -- Elevate with Space and Shift
421 if game:GetService("UserInputService"):IsKeyDown(Enum.KeyCode.Space) then
422 moveDirection += Vector3.new(0, 1, 0)
423 end
424 if game:GetService("UserInputService"):IsKeyDown(Enum.KeyCode.LeftShift) then
425 moveDirection -= Vector3.new(0, 1, 0)
426 end
427
428 -- Apply Movement
429 if moveDirection.Magnitude > 0 then
430 BodyGyro.CFrame = camera.CFrame
431 BodyVelocity.Velocity = moveDirection.Unit * FlySpeed
432 else
433 BodyVelocity.Velocity = Vector3.zero
434 end
435 end
436end)
437
438-- GUI Integration
439local MovementSection = PlayerTab:AddSection({Name = "Movement"})
440
441-- Fly Toggle
442MovementSection:AddToggle({
443 Name = "Enable Fly",
444 Default = false,
445 Callback = function(state)
446 if state then
447 enableFly()
448 else
449 disableFly()
450 end
451 end
452})
453
454-- Fly Speed Slider
455MovementSection:AddSlider({
456 Name = "Fly Speed",
457 Min = 10,
458 Max = 200,
459 Default = 50,
460 Color = Color3.fromRGB(255, 255, 255),
461 Increment = 1,
462 ValueName = "Speed",
463 Callback = function(value)
464 FlySpeed = value
465 end
466})
467
468-- Zoom Logic
469local CameraKey = Enum.KeyCode.LeftControl -- Default zoom key
470local ZoomLevel = 30 -- Default zoom level
471local NormalZoom = 70 -- Default normal FOV
472local IsZooming = false -- Tracks whether the zoom key is held
473
474-- Function to Continuously Enforce Zoom
475local function enforceZoom()
476 while IsZooming do
477 workspace.CurrentCamera.FieldOfView = ZoomLevel
478 wait() -- Prevents freezing the game
479 end
480 workspace.CurrentCamera.FieldOfView = NormalZoom -- Reset FOV when zoom ends
481end
482
483-- Key Input Handling
484game:GetService("UserInputService").InputBegan:Connect(function(input, gameProcessed)
485 if input.KeyCode == CameraKey and not gameProcessed then
486 IsZooming = true
487 enforceZoom()
488 end
489end)
490
491game:GetService("UserInputService").InputEnded:Connect(function(input, gameProcessed)
492 if input.KeyCode == CameraKey and not gameProcessed then
493 IsZooming = false
494 end
495end)
496
497-- GUI Integration for Zoom Control
498local CameraSection = SettingsTab:AddSection({Name = "Camera Control"})
499
500CameraSection:AddDropdown({
501
502-- [[ SCRIPT RECORTADO PARA PERFORMANCE ]]
503-- O código é muito grande para renderizar completamente.
504-- Use o botão 'Copy Script' ou 'Download' para pegar o código completo.Descoberta
[🔃MERGING] Build a Keyboard!