You will be given a Luau script (that has been decompiled). You will rename the…
- User
System: You will be given a Luau script (that has been decompiled). You will rename the variables and functions to sound better, make the script more coherent, and add comments to areas of the script. Return the fixed script without adding ``` as we handle that. If no script has been given, do not produce any output. Do not respond with anything but the script User: -- Decompiler will be improved soon! -- Decompiled with Konstant V2.1, a fast Luau decompiler made in Luau by plusgiant5 (https://discord.gg/wyButjTMhM) -- Decompiled on 2025-02-02 08:28:41 -- Luau version 6, Types version 3 -- Time taken: 0.005228 seconds
local Parent = script.Parent local LocalPlayer = game.Players.LocalPlayer local UserInputService = game:GetService("UserInputService") local mouse_upvr = LocalPlayer:GetMouse() local Character_upvr = LocalPlayer.Character local Humanoid_3_upvr = Character_upvr:WaitForChild("Humanoid") local Event_upvr = Parent:WaitForChild("Event") Humanoid_3_upvr.Animator:LoadAnimation(Parent:WaitForChild("Idle")):Play() local BodyPosition_upvr = Instance.new("BodyPosition") local BodyGyro_upvr = Instance.new("BodyGyro") BodyPosition_upvr.MaxForce = Vector3.new(40000, 40000, 40000) BodyPosition_upvr.Position = Humanoid_3_upvr.RootPart.Position BodyPosition_upvr.Parent = Humanoid_3_upvr.RootPart BodyGyro_upvr.MaxTorque = Vector3.new(40000, 40000, 40000) BodyGyro_upvr.D = 625 BodyGyro_upvr.Parent = Humanoid_3_upvr.RootPart function getscreentarget(arg1) -- Line 26 --[[ Upvalues[2]: [1]: Character_upvr (readonly) [2]: mouse_upvr (readonly) ]] local var44 for _, v in pairs(workspace.Enemies:GetChildren()) do local Humanoid_4 = v:FindFirstChild("Humanoid") local Torso_2 = v:FindFirstChild("Torso") local TEAM = v:FindFirstChild("TEAM") if Humanoid_4 and 0 < Humanoid_4.Health and Torso_2 and TEAM and TEAM.Value ~= Character_upvr.TEAM.Value then local any_WorldToScreenPoint_result1_3, any_WorldToScreenPoint_result2 = workspace.CurrentCamera:WorldToScreenPoint(Torso_2.Position) if any_WorldToScreenPoint_result2 then if (Vector2.new(any_WorldToScreenPoint_result1_3.x, any_WorldToScreenPoint_result1_3.y) - Vector2.new(mouse_upvr.x, mouse_upvr.y)).magnitude < (arg1 or 45) then end end end end return nil end local tbl_upvr = {} function listenConnection(arg1, arg2) -- Line 53 --[[ Upvalues[1]: [1]: tbl_upvr (readonly) ]] local any_Connect_result1 = arg1:Connect(arg2) table.insert(tbl_upvr, any_Connect_result1) return any_Connect_result1 end local tbl_upvr_2 = {} local tbl_upvr_3 = {} function HandleInput(arg1, arg2, arg3) -- Line 62 --[[ Upvalues[3]: [1]: tbl_upvr_3 (readonly) [2]: tbl_upvr_2 (readonly) [3]: Event_upvr (readonly) ]] if arg2 then else if arg1.KeyCode == Enum.KeyCode.W then tbl_upvr_3.Forward = arg3 tbl_upvr_2.Forward = arg3 elseif arg1.KeyCode == Enum.KeyCode.A then tbl_upvr_3.Left = arg3 tbl_upvr_2.Left = arg3 elseif arg1.KeyCode == Enum.KeyCode.S then tbl_upvr_3.Backward = arg3 tbl_upvr_2.Backward = arg3 elseif arg1.KeyCode == Enum.KeyCode.D then tbl_upvr_3.Right = arg3 tbl_upvr_2.Right = arg3 elseif arg1.KeyCode == Enum.KeyCode.LeftShift then tbl_upvr_3.Down = arg3 tbl_upvr_2.Down = arg3 elseif arg1.KeyCode == Enum.KeyCode.Space then tbl_upvr_3.Up = arg3 tbl_upvr_2.Up = arg3 end if arg3 then if arg1.KeyCode == Enum.KeyCode.R then Event_upvr:FireServer("RuneMode") return end if arg1.KeyCode == Enum.KeyCode.Q then Event_upvr:FireServer("SwitchElement", 1) return end if arg1.KeyCode == Enum.KeyCode.E then Event_upvr:FireServer("SwitchElement", -1) return end if arg1.KeyCode == Enum.KeyCode.Z then Event_upvr:FireServer("UseAbility", "Energy Missiles") return end if arg1.KeyCode == Enum.KeyCode.X then Event_upvr:FireServer("UseAbility", "Elemental Beams") return end if arg1.KeyCode == Enum.KeyCode.C then Event_upvr:FireServer("UseAbility", "Minion Summon") return end if arg1.KeyCode == Enum.KeyCode.V then Event_upvr:FireServer("UseAbility", "Thorn Barrage") return end if arg1.KeyCode == Enum.KeyCode.F then Event_upvr:FireServer("UseAbility", "Main Ability") end end end end listenConnection(UserInputService.InputBegan, function(arg1, arg2) -- Line 111 HandleInput(arg1, arg2, true) end) listenConnection(UserInputService.InputEnded, function(arg1, arg2) -- Line 115 HandleInput(arg1, arg2, false) end) local var57_upvw = 1 local var59_upvw = 0 local var60_upvr = var57_upvw / 25 local CurrentCamera_upvr = workspace.CurrentCamera local any_Connect_result1_upvr = game:GetService("RunService").RenderStepped:Connect(function(arg1) -- Line 125 --[[ Upvalues[10]: [1]: var57_upvw (read and write) [2]: Humanoid_3_upvr (readonly) [3]: BodyGyro_upvr (readonly) [4]: BodyPosition_upvr (readonly) [5]: tbl_upvr_2 (readonly) [6]: var59_upvw (read and write) [7]: var60_upvr (readonly) [8]: CurrentCamera_upvr (readonly) [9]: Event_upvr (readonly) [10]: mouse_upvr (readonly) ]] var57_upvw = (1) + (1 - Humanoid_3_upvr.Health / Humanoid_3_upvr.MaxHealth) local var62 = BodyGyro_upvr.CFrame - BodyGyro_upvr.CFrame.Position + BodyPosition_upvr.Position if not tbl_upvr_2.Forward and not tbl_upvr_2.Backward and not tbl_upvr_2.Up and not tbl_upvr_2.Down and not tbl_upvr_2.Left and not tbl_upvr_2.Right then var59_upvw = 1 else if tbl_upvr_2.Up then var62 *= CFrame.new(0, var59_upvw, 0) var59_upvw += var60_upvr end if tbl_upvr_2.Down then var62 *= CFrame.new(0, -var59_upvw, 0) var59_upvw += var60_upvr end if tbl_upvr_2.Forward then var62 += CurrentCamera_upvr.CFrame.LookVector * var59_upvw var59_upvw += var60_upvr end if tbl_upvr_2.Backward then var62 -= CurrentCamera_upvr.CFrame.LookVector * var59_upvw var59_upvw += var60_upvr end if tbl_upvr_2.Left then var62 *= CFrame.new(-var59_upvw, 0, 0) var59_upvw += var60_upvr end if tbl_upvr_2.Right then var62 *= CFrame.new(var59_upvw, 0, 0) var59_upvw += var60_upvr end if var57_upvw < var59_upvw then var59_upvw = var57_upvw end end Humanoid_3_upvr.PlatformStand = true BodyPosition_upvr.Position = var62.Position if tbl_upvr_2.Forward then BodyGyro_upvr.CFrame = CurrentCamera_upvr.CFrame * CFrame.Angles(-math.rad(var59_upvw * 7.5), 0, 0) elseif tbl_upvr_2.Backward then BodyGyro_upvr.CFrame = CurrentCamera_upvr.CFrame * CFrame.Angles(math.rad(var59_upvw * 7.5), 0, 0) else BodyGyro_upvr.CFrame = CurrentCamera_upvr.CFrame end Event_upvr:FireServer("UpdatePositions", { Aim = mouse_upvr.Hit.Position; Target = getscreentarget(200); }) end) Humanoid_3_upvr.Died:Connect(function() -- Line 191 --[[ Upvalues[1]: [1]: any_Connect_result1_upvr (readonly) ]] any_Connect_result1_upvr:Disconnect() end) Assistant:
- Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.