SHOW:
|
|
- or go back to the newest paste.
| 1 | local NotifyLib = loadstring(game:HttpGet("https://raw.githubusercontent.com/xwel33/hud/main/Notification"))()
| |
| 2 | ||
| 3 | local ScreenGui = Instance.new("ScreenGui")
| |
| 4 | ScreenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
| |
| 5 | ScreenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling | |
| 6 | ||
| 7 | local Frame = Instance.new("Frame")
| |
| 8 | Frame.BackgroundColor3 = Color3.fromRGB(81, 72, 115) | |
| 9 | Frame.BorderColor3 = Color3.fromRGB(0, 0, 0) | |
| 10 | Frame.BorderSizePixel = 0 | |
| 11 | Frame.Position = UDim2.new(0.351797849, 0, 0.300268084, 0) | |
| 12 | Frame.Size = UDim2.new(0, 305, 0, 298) | |
| 13 | Frame.Parent = ScreenGui | |
| 14 | ||
| 15 | local dragging | |
| 16 | local dragInput | |
| 17 | local dragStart | |
| 18 | local startPos | |
| 19 | ||
| 20 | Frame.InputBegan:Connect(function(input) | |
| 21 | if input.UserInputType == Enum.UserInputType.MouseButton1 then | |
| 22 | dragging = true | |
| 23 | dragStart = input.Position | |
| 24 | startPos = Frame.Position | |
| 25 | input.Changed:Connect(function() | |
| 26 | if input.UserInputState == Enum.UserInputState.End then | |
| 27 | dragging = false | |
| 28 | end | |
| 29 | end) | |
| 30 | end | |
| 31 | end) | |
| 32 | ||
| 33 | Frame.InputChanged:Connect(function(input) | |
| 34 | if input.UserInputType == Enum.UserInputType.MouseMovement then | |
| 35 | dragInput = input | |
| 36 | end | |
| 37 | end) | |
| 38 | ||
| 39 | game:GetService("UserInputService").InputChanged:Connect(function(input)
| |
| 40 | if dragging and input == dragInput then | |
| 41 | local delta = input.Position - dragStart | |
| 42 | Frame.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y) | |
| 43 | end | |
| 44 | end) | |
| 45 | ||
| 46 | local Frame_2 = Instance.new("Frame")
| |
| 47 | Frame_2.BackgroundColor3 = Color3.fromRGB(50, 50, 50) | |
| 48 | Frame_2.BorderColor3 = Color3.fromRGB(0, 0, 0) | |
| 49 | Frame_2.BorderSizePixel = 0 | |
| 50 | Frame_2.Position = UDim2.new(0.0293965321, 0, 0.0210608151, 0) | |
| 51 | Frame_2.Size = UDim2.new(0, 287, 0, 284) | |
| 52 | Frame_2.Parent = Frame | |
| 53 | ||
| 54 | local TextLabel = Instance.new("TextLabel")
| |
| 55 | TextLabel.BackgroundColor3 = Color3.fromRGB(81, 72, 115) | |
| 56 | TextLabel.BorderColor3 = Color3.fromRGB(0, 0, 0) | |
| 57 | TextLabel.BorderSizePixel = 0 | |
| 58 | TextLabel.Size = UDim2.new(0, 287, 0, 50) | |
| 59 | TextLabel.Font = Enum.Font.SourceSans | |
| 60 | TextLabel.LineHeight = 0.770 | |
| 61 | TextLabel.Text = "Key System" | |
| 62 | TextLabel.TextColor3 = Color3.fromRGB(0, 0, 0) | |
| 63 | TextLabel.TextSize = 23.000 | |
| 64 | TextLabel.Parent = Frame_2 | |
| 65 | ||
| 66 | local TextButton = Instance.new("TextButton")
| |
| 67 | TextButton.BackgroundColor3 = Color3.fromRGB(41, 41, 41) | |
| 68 | TextButton.BorderColor3 = Color3.fromRGB(0, 0, 0) | |
| 69 | TextButton.BorderSizePixel = 0 | |
| 70 | TextButton.Position = UDim2.new(0.149825782, 0, 0.792253494, 0) | |
| 71 | TextButton.Size = UDim2.new(0, 200, 0, 50) | |
| 72 | TextButton.Font = Enum.Font.SourceSans | |
| 73 | TextButton.Text = "Load Script" | |
| 74 | TextButton.TextColor3 = Color3.fromRGB(0, 0, 0) | |
| 75 | TextButton.TextSize = 19.000 | |
| 76 | TextButton.Parent = Frame_2 | |
| 77 | ||
| 78 | local UICorner = Instance.new("UICorner")
| |
| 79 | UICorner.Parent = TextButton | |
| 80 | ||
| 81 | local TextLabel_2 = Instance.new("TextLabel")
| |
| 82 | TextLabel_2.BackgroundColor3 = Color3.fromRGB(41, 41, 41) | |
| 83 | TextLabel_2.BackgroundTransparency = 1.000 | |
| 84 | TextLabel_2.BorderColor3 = Color3.fromRGB(0, 0, 0) | |
| 85 | TextLabel_2.BorderSizePixel = 0 | |
| 86 | TextLabel_2.Position = UDim2.new(0.149825782, 0, 0.17605634, 0) | |
| 87 | TextLabel_2.Size = UDim2.new(0, 200, 0, 50) | |
| 88 | TextLabel_2.Font = Enum.Font.SourceSans | |
| 89 | TextLabel_2.Text = "Key Here" | |
| 90 | TextLabel_2.TextColor3 = Color3.fromRGB(0, 0, 0) | |
| 91 | TextLabel_2.TextSize = 19.000 | |
| 92 | TextLabel_2.Parent = Frame_2 | |
| 93 | ||
| 94 | local UICorner_2 = Instance.new("UICorner")
| |
| 95 | UICorner_2.Parent = TextLabel_2 | |
| 96 | ||
| 97 | local TextBox = Instance.new("TextBox")
| |
| 98 | TextBox.BackgroundColor3 = Color3.fromRGB(81, 72, 115) | |
| 99 | TextBox.BorderColor3 = Color3.fromRGB(0, 0, 0) | |
| 100 | TextBox.BorderSizePixel = 0 | |
| 101 | TextBox.Position = UDim2.new(0.149825782, 0, 0.316901416, 0) | |
| 102 | TextBox.Size = UDim2.new(0, 200, 0, 50) | |
| 103 | TextBox.Font = Enum.Font.SourceSans | |
| 104 | TextBox.Text = "" | |
| 105 | TextBox.TextColor3 = Color3.fromRGB(0, 0, 0) | |
| 106 | TextBox.TextSize = 14.000 | |
| 107 | TextBox.Parent = Frame_2 | |
| 108 | ||
| 109 | local UICorner_3 = Instance.new("UICorner")
| |
| 110 | UICorner_3.Parent = TextBox | |
| 111 | ||
| 112 | local UICorner_5 = Instance.new("UICorner")
| |
| 113 | UICorner_5.CornerRadius = UDim.new(0, 11) | |
| 114 | UICorner_5.Parent = Frame | |
| 115 | ||
| 116 | - | local customKey = "BCDHFI" |
| 116 | + | local customKey = "a" |
| 117 | ||
| 118 | local function isValidKey(enteredKey) | |
| 119 | return enteredKey == customKey | |
| 120 | end | |
| 121 | ||
| 122 | local function loadScript(enteredKey) | |
| 123 | if isValidKey(enteredKey) then | |
| 124 | NotifyLib.prompt('Kingston', 'Correct Key', 2)
| |
| 125 | NotifyLib.prompt('Kingston', 'Loading...', 2)
| |
| 126 | local Kingston = {
| |
| 127 | ["Options"] = {
| |
| 128 | ["Anti Error"] = false, -- // Doesnt show errors in F9 Console | |
| 129 | ["Bypass Idle Kick"] = false, | |
| 130 | ["Boost FPS"] = {
| |
| 131 | ["Enabled"] = true, | |
| 132 | ["Unlock FPS"] = {
| |
| 133 | ["Enabled"] = false, | |
| 134 | ["Value"] = 60 | |
| 135 | } | |
| 136 | }, | |
| 137 | ["Find Best Server"] = {
| |
| 138 | ["Enabled"] = true, | |
| 139 | ["PingThreshold"] = "100" -- // The ping the server has to have. (Not Exact Ofc) | |
| 140 | } | |
| 141 | }, | |
| 142 | ["Parrying"] = {
| |
| 143 | ["Auto Parry"] = {
| |
| 144 | ["Enabled"] = true, | |
| 145 | ["Print Information"] = false, | |
| 146 | ["Face Ball"] = {
| |
| 147 | ["Enabled"] = false, | |
| 148 | ["Keybind"] = "N" | |
| 149 | }, | |
| 150 | ["Visualize Distance"] = { -- // Uses A "Sphere" / "Ball" Part
| |
| 151 | ["Enabled"] = false, | |
| 152 | ["Color"] = Color3.new(1 , 0 , 0), -- // Red , Green , Blue | |
| 153 | ["Transparency"] = 0 -- // 0 . Completely Visible | 1 . Invisible | |
| 154 | } | |
| 155 | }, | |
| 156 | ["Spamming"] = {
| |
| 157 | ["Enabled"] = true, | |
| 158 | ["Distance"] = {15, 2}, -- // 1st Value = Dist Between You + Target, 2nd Value = Dist Between You + Ball
| |
| 159 | ["Notify"] = false, | |
| 160 | ["Face Target"] = { -- // Disables when you die
| |
| 161 | ["Enabled"] = false, | |
| 162 | ["Require Distance"] = false, -- // Checks if you're in the range (1st value on "Distance" before looking at the target) | |
| 163 | ["Keybind"] = "U" | |
| 164 | }, | |
| 165 | ["Visualize Distance"] = {
| |
| 166 | ["Enabled"] = false, | |
| 167 | ["Mode"] = "Display Target", -- // "Display Target", "Display Ball", "Display Both" | |
| 168 | ["Target Display"] = {
| |
| 169 | ["Color"] = Color3.new(1 , 0 , 0), | |
| 170 | ["Transparency"] = 0 | |
| 171 | }, | |
| 172 | ["Ball Display"] = {
| |
| 173 | ["Color"] = Color3.new(1 , 0 , 0), | |
| 174 | ["Transparency"] = 0, | |
| 175 | } | |
| 176 | } | |
| 177 | } | |
| 178 | }, | |
| 179 | ["Force Target"] = { -- // Beta
| |
| 180 | ["Enabled"] = false, | |
| 181 | ["Keybind"] = "P", | |
| 182 | ["Radius"] = {
| |
| 183 | ["Use Radius"] = false, | |
| 184 | ["Size"] = {30, 15}, -- // Used for the box's size
| |
| 185 | }, | |
| 186 | ["Show Target"] = {
| |
| 187 | ["Enabled"] = false, | |
| 188 | ["Type"] = "Highlight", -- // Only highlight (which isnt streamable not like the method is streamable either) | |
| 189 | ["Color"] = Color3.new(1 , 0 , 4), | |
| 190 | ["Transparency"] = 0.5 | |
| 191 | } | |
| 192 | }, | |
| 193 | ["Ability Spammer"] = { -- // Spams The Selected Ability
| |
| 194 | ["Enabled"] = false, | |
| 195 | ["Ability"] = "Freeze", | |
| 196 | ["Keybind"] = "L" | |
| 197 | }, | |
| 198 | ["Misc"] = {
| |
| 199 | ["Mod"] = { -- // Mod Detection
| |
| 200 | ["Enabled"] = false, | |
| 201 | ["OnJoin"] = "Kick", -- // Kick, Notify | |
| 202 | ["Notification"] = "Mod Joined", | |
| 203 | ["Delay"] = 1, | |
| 204 | ["Rank"] = 200 | |
| 205 | }, | |
| 206 | ["MemSpoofer"] = { -- // Spoofs your ingame memory
| |
| 207 | ["Enabled"] = true, | |
| 208 | ["Range"] = {500, 520}, -- // Start, End
| |
| 209 | ["Delay"] = 1, -- // Delay between the time it changes (1 is normal) | |
| 210 | ["Method"] = 0 -- // 0, 1 | |
| 211 | }, | |
| 212 | ["Movement"] = { -- // Speed Hacks
| |
| 213 | ["Enabled"] = true, | |
| 214 | ["Type"] = "CFrame", -- // "CFrame", "Humanoid.WS" | |
| 215 | ["Speed Value"] = 0.6, | |
| 216 | ["DefaultWS"] = 70, -- // 70 Is the sprinting walkspeed for blade ball | |
| 217 | ["Keybind"] = "Z" | |
| 218 | }, | |
| 219 | ["HitSound"] = { -- // Plays when you parry the ball
| |
| 220 | ["Enabled"] = true, | |
| 221 | ["Sound"] = "Bameware", -- // "Bameware", "Skeet", "Bonk", "Lazer Beam", "Windows XP Error", "TF2 Hitsound", "TF2 Critical", "TF2 Bat", "Bow Hit", "Bow", "OSU", "Minecraft Hit", "Steve", "1nn", "Rust", "TF2 Pan", "Neverlose", "Mario" | |
| 222 | ["Pitch"] = -2, | |
| 223 | ["Volume"] = 1.6 | |
| 224 | }, | |
| 225 | ["Skybox"] = {
| |
| 226 | ["Enabled"] = true, | |
| 227 | ["Type"] = "Pink Sky" -- // "Pink Sky", "Red Sky", "Nebula", "Dark Night", "Space", "Purple Sky", "Green Sky" | |
| 228 | }, | |
| 229 | ["TargetStrafe"] = {
| |
| 230 | ["Enabled"] = false, | |
| 231 | ["Speed"] = 3, | |
| 232 | ["Distance"] = 6, | |
| 233 | ["Height"] = 3, | |
| 234 | ["Keybind"] = "O", | |
| 235 | ["Visualize"] = {
| |
| 236 | ["Enabled"] = false, | |
| 237 | ["Color"] = Color3.new(0 , 1 , 0), | |
| 238 | ["Transparency"] = 0 | |
| 239 | } | |
| 240 | }, | |
| 241 | ["Lighting"] = {
| |
| 242 | ["Enabled"] = false, | |
| 243 | ["Remove Fog"] = false, | |
| 244 | ["Remove Textures"] = false, | |
| 245 | ["Remove Grass"] = false, | |
| 246 | ["Remove Reflections"] = false, | |
| 247 | ["Remove Shadows"] = false, | |
| 248 | ["Water %"] = {false, 50, Color3.new(1, 9, 3)} -- // Enable Water Reduction | Enable, Reduction Percentage, Color
| |
| 249 | }, | |
| 250 | ["Player"] = {
| |
| 251 | ["Enabled"] = false, | |
| 252 | ["Jump Power"] = {false, 100},
| |
| 253 | ["Gravity"] = {false, -50}
| |
| 254 | }, | |
| 255 | ["Sword Grip"] = {
| |
| 256 | ["Enabled"] = false, | |
| 257 | ["Delete Sword"] = false, | |
| 258 | ["Values"] = {
| |
| 259 | ["Front"] = 3, | |
| 260 | ["Side"] = 2, | |
| 261 | ["Height"] = 5 | |
| 262 | } | |
| 263 | }, | |
| 264 | ["Fly"] = {
| |
| 265 | ["Enabled"] = true, | |
| 266 | ["Speed"] = 10, | |
| 267 | ["Velocity"] = Vector3.new(0, 12, 0), -- // X, Y, Z | |
| 268 | ["Keybind"] = "F" | |
| 269 | } | |
| 270 | } | |
| 271 | } | |
| 272 | ||
| 273 | local sus = false -- // Used for Ability Spammer | |
| 274 | local Version = "1.13.9" | |
| 275 | local CoreGui = game:GetService("CoreGui")
| |
| 276 | local PerformanceStats = CoreGui:WaitForChild("RobloxGui"):WaitForChild("PerformanceStats", 1)
| |
| 277 | local DevConsole = CoreGui:WaitForChild("DevConsoleMaster", 1)
| |
| 278 | local UserInputService = game:GetService("UserInputService")
| |
| 279 | local HTTPService = game:GetService("HttpService")
| |
| 280 | local TeleportService = game:GetService("TeleportService")
| |
| 281 | local StatsService = game:GetService("Stats")
| |
| 282 | local MarketplaceService = game:GetService('MarketplaceService')
| |
| 283 | local GroupService = game:GetService('GroupService')
| |
| 284 | local ScriptContext = game:GetService('ScriptContext')
| |
| 285 | local workspace = game:GetService("Workspace")
| |
| 286 | local RunService = game:GetService("RunService")
| |
| 287 | local Players = game:GetService("Players")
| |
| 288 | local Localplayer = Players.LocalPlayer | |
| 289 | local Balls = workspace:WaitForChild("Balls")
| |
| 290 | local VirtualUser = game:GetService("VirtualUser")
| |
| 291 | local ParryRemote = game:GetService("ReplicatedStorage"):WaitForChild("Remotes"):WaitForChild("ParryAttempt")
| |
| 292 | local NotifyLib = loadstring(game:HttpGet("https://raw.githubusercontent.com/xwel33/hud/main/Notification"))()
| |
| 293 | local Light = game:GetService("Lighting")
| |
| 294 | local SFC = setfpscap | |
| 295 | local FPS = Kingston.Options["Boost FPS"]["Unlock FPS"].Value | |
| 296 | local Camera = game.Workspace.CurrentCamera | |
| 297 | local Mouse = Localplayer:GetMouse() | |
| 298 | ||
| 299 | NotifyLib.prompt('Kington | ', 'Beta Build Loaded | V ' .. Version .. ' |', 2)
| |
| 300 | ||
| 301 | ||
| 302 | local RadiusEnabled = Kingston["Force Target"]["Radius"]["Use Radius"] | |
| 303 | local ShowTargetEnabled = Kingston["Force Target"]["Show Target"]["Enabled"] | |
| 304 | local RadiusSize = Kingston["Force Target"]["Radius"]["Size"] | |
| 305 | local ShowTargetType = Kingston["Force Target"]["Show Target"]["Type"] | |
| 306 | local Keybind = Kingston["Force Target"]["Keybind"] | |
| 307 | ||
| 308 | ||
| 309 | Builders = {
| |
| 310 | Connections = {
| |
| 311 | CACHE_MEMORY = {}; -- later used for the mem spoofer
| |
| 312 | }, | |
| 313 | Memory = 400; -- Current memory for memory spoofer | |
| 314 | } | |
| 315 | ||
| 316 | if Kingston.Options["Boost FPS"].Enabled then | |
| 317 | if Kingston.Options["Boost FPS"]["Unlock FPS"].Enabled then | |
| 318 | SFC(FPS) | |
| 319 | ||
| 320 | local function toggleDevConsoleVisibility(enable) | |
| 321 | local coreGui = game:GetService("CoreGui")
| |
| 322 | local devConsoleUI = coreGui:FindFirstChild("DevConsoleUI", true)
| |
| 323 | ||
| 324 | if devConsoleUI then | |
| 325 | local mainView = devConsoleUI:FindFirstChild("MainView")
| |
| 326 | ||
| 327 | if mainView then | |
| 328 | mainView.Parent.Enabled = enable | |
| 329 | end | |
| 330 | end | |
| 331 | end | |
| 332 | ||
| 333 | game.DescendantAdded:Connect(function(descendant) | |
| 334 | if descendant.Name == "MainView" and descendant.Parent.Name == "DevConsoleUI" and boostFPS then | |
| 335 | task.wait() | |
| 336 | toggleDevConsoleVisibility(false) | |
| 337 | end | |
| 338 | end) | |
| 339 | ||
| 340 | vim:SendKeyEvent(true, "F9", 0, game) | |
| 341 | task.wait() | |
| 342 | vim:SendKeyEvent(false, "F9", 0, game) | |
| 343 | ||
| 344 | while true do | |
| 345 | task.wait() | |
| 346 | ||
| 347 | if boostFPS then | |
| 348 | warn("")
| |
| 349 | ||
| 350 | if not game:GetService("CoreGui"):FindFirstChild("DevConsoleUI", true):FindFirstChild("MainView") then
| |
| 351 | toggleDevConsoleVisibility(true) | |
| 352 | task.wait() | |
| 353 | toggleDevConsoleVisibility(false) | |
| 354 | end | |
| 355 | end | |
| 356 | end | |
| 357 | end | |
| 358 | end | |
| 359 | ||
| 360 | if Kingston.Options["Find Best Server"].Enabled then | |
| 361 | if Kingston.Options["Find Best Server"].Enabled then | |
| 362 | local function fetchServersData(placeId, limit) | |
| 363 | local url = string.format("https://games.roblox.com/v1/games/%d/servers/Public?limit=%d", placeId, limit)
| |
| 364 | local success, response = pcall(function() | |
| 365 | return game:HttpGet(url) -- removed unnecessary JSONDecode since response is not JSON | |
| 366 | end) | |
| 367 | ||
| 368 | if success and response then | |
| 369 | return game.HttpService:JSONDecode(response).data -- fix JSON decoding | |
| 370 | end | |
| 371 | ||
| 372 | return nil | |
| 373 | end | |
| 374 | ||
| 375 | local placeId = game.PlaceId | |
| 376 | local serverLimit = 100 | |
| 377 | local servers = fetchServersData(placeId, serverLimit) | |
| 378 | ||
| 379 | if not servers then | |
| 380 | return | |
| 381 | end | |
| 382 | ||
| 383 | local lowestPingServer = nil | |
| 384 | ||
| 385 | for _, server in pairs(servers) do | |
| 386 | if (not lowestPingServer or (server.ping and server.ping < lowestPingServer.ping)) and server.maxPlayers > server.playing then | |
| 387 | lowestPingServer = server | |
| 388 | end | |
| 389 | end | |
| 390 | ||
| 391 | local commonLoadTime = 5 | |
| 392 | wait(commonLoadTime) -- task.wait is deprecated, use wait | |
| 393 | ||
| 394 | local pingThreshold = Kingston.Options["Find Best Server"].PingThreshold | |
| 395 | local serverStats = game:GetService("Stats").Network.ServerStatsItem
| |
| 396 | local dataPing = serverStats["Data Ping"]:GetValueString() | |
| 397 | local pingValue = tonumber(dataPing:match("(%d+)"))
| |
| 398 | ||
| 399 | if pingValue >= pingThreshold then | |
| 400 | TeleportService:TeleportToPlaceInstance(placeId, lowestPingServer.id) | |
| 401 | else | |
| 402 | ||
| 403 | end | |
| 404 | end | |
| 405 | ||
| 406 | if Kingston.Options["Unlock FPS"] then | |
| 407 | SFC(FPS); | |
| 408 | end | |
| 409 | ||
| 410 | if Kingston.Options["Bypass Idle Kick"] == true then | |
| 411 | Players.Localplayer.Idled:Connect(function() | |
| 412 | VirtualUser:Button2Down(Vector2.new(0, 0), workspace.CurrentCamera.CFrame) | |
| 413 | wait(1) | |
| 414 | VirtualUser:Button2Up(Vector2.new(0, 0), workspace.CurrentCamera.CFrame) | |
| 415 | end) | |
| 416 | while true do | |
| 417 | wait() | |
| 418 | end | |
| 419 | end | |
| 420 | ||
| 421 | if Kingston.Options["Anti Error"] then | |
| 422 | local connections = ScriptContext.Error:GetConnections() | |
| 423 | for i, connection in ipairs(connections) do | |
| 424 | connection:Disable() | |
| 425 | end | |
| 426 | end | |
| 427 | ||
| 428 | if Kingston.Parrying["Auto Parry"].Enabled then | |
| 429 | getgenv().Signal = Signal or {}
| |
| 430 | ||
| 431 | -- Function to get player points | |
| 432 | function PlayerPoints() | |
| 433 | local tbl = {}
| |
| 434 | ||
| 435 | for _, player in pairs(Players:GetPlayers()) do | |
| 436 | local userId = tostring(player.UserId) | |
| 437 | local humanoidRootPart = player.Character and player.Character:FindFirstChild("HumanoidRootPart")
| |
| 438 | ||
| 439 | if humanoidRootPart and player == LocalPlayer then | |
| 440 | tbl[userId] = Camera:WorldToScreenPoint(humanoidRootPart.Position) | |
| 441 | end | |
| 442 | end | |
| 443 | ||
| 444 | for userId, screenPosition in pairs(tbl) do | |
| 445 | print(userId, screenPosition) | |
| 446 | end | |
| 447 | ||
| 448 | return tbl | |
| 449 | end | |
| 450 | -- Function to perform the parry attempt | |
| 451 | function Parry() | |
| 452 | if Localplayer.Character then | |
| 453 | local worldToScreenPoint = Camera:WorldToScreenPoint(Localplayer.Character.HumanoidRootPart.Position) | |
| 454 | local args = {
| |
| 455 | [1] = 0.5, | |
| 456 | [2] = workspace.CurrentCamera.CFrame, | |
| 457 | [3] = PlayerPoints(), | |
| 458 | [4] = {
| |
| 459 | [1] = worldToScreenPoint.X, | |
| 460 | [2] = worldToScreenPoint.Y | |
| 461 | } | |
| 462 | } | |
| 463 | if Kingston.Parrying["Auto Parry"]["Print Information"] then | |
| 464 | warn("Players:", unpack(args[3]))
| |
| 465 | end | |
| 466 | ParryRemote:FireServer(unpack(args)) | |
| 467 | end | |
| 468 | end | |
| 469 | ||
| 470 | -- Initialize debounce and last player and time variables | |
| 471 | local Debounce = false | |
| 472 | local LastPlayer = false | |
| 473 | local LastTime = nil | |
| 474 | local LastTime = LastTime | |
| 475 | ||
| 476 | -- Function to anticipate | |
| 477 | function Anticipate(Time) | |
| 478 | if Debounce then | |
| 479 | return | |
| 480 | end | |
| 481 | ||
| 482 | if LastTime then | |
| 483 | local Sum = (Time - LastTime) | |
| 484 | if Sum >= -25 and Sum <= 25 then | |
| 485 | if Sum >= 25 or Sum <= -25 then | |
| 486 | return true | |
| 487 | end | |
| 488 | end | |
| 489 | end | |
| 490 | ||
| 491 | LastTime = Time | |
| 492 | end | |
| 493 | ||
| 494 | -- Function to calculate projectile time | |
| 495 | function calculateProjectileTime(initialPosition, targetPosition, initialVelocity) | |
| 496 | local distance = (targetPosition - initialPosition).Magnitude | |
| 497 | local time = distance / initialVelocity.Magnitude | |
| 498 | return time | |
| 499 | end | |
| 500 | ||
| 501 | -- Function to calculate distance between projectile and object | |
| 502 | function calculateDistance(projectilePosition, objectPosition) | |
| 503 | return math.abs((projectilePosition - objectPosition).Magnitude) | |
| 504 | end | |
| 505 | ||
| 506 | -- Function to check if the object can intercept (parry) the projectile | |
| 507 | function canObjectParry(projectilePosition, objectPosition, projectileVelocity, objectVelocity) | |
| 508 | local timeToIntercept = calculateProjectileTime(projectilePosition, objectPosition, projectileVelocity) | |
| 509 | local distanceToIntercept = calculateDistance(projectilePosition + projectileVelocity * timeToIntercept, objectPosition + objectVelocity * timeToIntercept) | |
| 510 | local AnticipateResult = Anticipate(timeToIntercept) | |
| 511 | ||
| 512 | print("CanParry:", distanceToIntercept, timeToIntercept, AnticipateResult)
| |
| 513 | ||
| 514 | local conditions = {
| |
| 515 | (Anticipate and distanceToIntercept <= 60), | |
| 516 | (distanceToIntercept <= 14 and | |
| 517 | timeToIntercept >= 0.00000000000000000000000000000000000000000000000000000000000001 and | |
| 518 | timeToIntercept <= 0.12), | |
| 519 | (distanceToIntercept <= 13 and | |
| 520 | timeToIntercept >= 0.00000000000000000000000000000000000000000000000000000000000001 and | |
| 521 | timeToIntercept <= 0.12), | |
| 522 | (distanceToIntercept <= 12 and | |
| 523 | timeToIntercept >= 0.00000000000000000000000000000000000000000000000000000000000001 and | |
| 524 | timeToIntercept <= 0.12), | |
| 525 | (distanceToIntercept <= 11.5 and | |
| 526 | timeToIntercept >= 0.00000000000000000000000000000000000000000000000000000000000001 and | |
| 527 | timeToIntercept <= 0.1105), | |
| 528 | (distanceToIntercept <= 11.7 and | |
| 529 | timeToIntercept >= 0.00000000000000000000000000000000000000000000000000000000000001 and | |
| 530 | timeToIntercept <= 0.1107), | |
| 531 | (distanceToIntercept <= 11.3 and | |
| 532 | timeToIntercept >= 0.00000000000000000000000000000000000000000000000000000000000001 and | |
| 533 | timeToIntercept <= 0.1103), | |
| 534 | (distanceToIntercept <= 11 and | |
| 535 | timeToIntercept >= 0.00000000000000000000000000000000000000000000000000000000000001 and | |
| 536 | timeToIntercept <= 0.11), | |
| 537 | (distanceToIntercept <= 0.04 and | |
| 538 | timeToIntercept >= 0.00000000000000000000000000000000000000000000000000000000000001 and | |
| 539 | timeToIntercept <= 0.004), | |
| 540 | (distanceToIntercept <= 0.05 and | |
| 541 | timeToIntercept >= 0.00000000000000000000000000000000000000000000000000000000000001 and | |
| 542 | timeToIntercept <= 0.005), | |
| 543 | (distanceToIntercept <= 0.01 and | |
| 544 | timeToIntercept >= 0.00000000000000000000000000000000000000000000000000000000000001 and | |
| 545 | timeToIntercept <= 0.001), | |
| 546 | (distanceToIntercept <= 0.03 and | |
| 547 | timeToIntercept >= 0.00000000000000000000000000000000000000000000000000000000000001 and | |
| 548 | timeToIntercept <= 0.003), | |
| 549 | (distanceToIntercept <= 0.02 and | |
| 550 | timeToIntercept >= 0.00000000000000000000000000000000000000000000000000000000000001 and | |
| 551 | timeToIntercept <= 0.002), | |
| 552 | (distanceToIntercept <= 8.5 and | |
| 553 | timeToIntercept >= 0.00000000000000000000000000000000000000000000000000000000000001 and | |
| 554 | timeToIntercept <= 0.085), | |
| 555 | (distanceToIntercept <= 8.7 and | |
| 556 | timeToIntercept >= 0.00000000000000000000000000000000000000000000000000000000000001 and | |
| 557 | timeToIntercept <= 0.087), | |
| 558 | (distanceToIntercept <= 8 and | |
| 559 | timeToIntercept >= 0.00000000000000000000000000000000000000000000000000000000000001 and | |
| 560 | timeToIntercept <= 0.08), | |
| 561 | (distanceToIntercept <= 10 and | |
| 562 | timeToIntercept >= 0.00000000000000000000000000000000000000000000000000000000000001 and | |
| 563 | timeToIntercept <= 0.1), | |
| 564 | (distanceToIntercept <= 10.7 and | |
| 565 | timeToIntercept >= 0.00000000000000000000000000000000000000000000000000000000000001 and | |
| 566 | timeToIntercept <= 0.17), | |
| 567 | (distanceToIntercept <= 10.5 and | |
| 568 | timeToIntercept >= 0.00000000000000000000000000000000000000000000000000000000000001 and | |
| 569 | timeToIntercept <= 0.15), | |
| 570 | (distanceToIntercept <= 10.3 and | |
| 571 | timeToIntercept >= 0.00000000000000000000000000000000000000000000000000000000000001 and | |
| 572 | timeToIntercept <= 0.13), | |
| 573 | (distanceToIntercept <= 9 and | |
| 574 | timeToIntercept >= 0.00000000000000000000000000000000000000000000000000000000000001 and | |
| 575 | timeToIntercept <= 0.09), | |
| 576 | (distanceToIntercept <= 9.3 and | |
| 577 | timeToIntercept >= 0.00000000000000000000000000000000000000000000000000000000000001 and | |
| 578 | timeToIntercept <= 0.093), | |
| 579 | (distanceToIntercept <= 9.5 and | |
| 580 | timeToIntercept >= 0.00000000000000000000000000000000000000000000000000000000000001 and | |
| 581 | timeToIntercept <= 0.095), | |
| 582 | (distanceToIntercept <= 9.7 and | |
| 583 | timeToIntercept >= 0.00000000000000000000000000000000000000000000000000000000000001 and | |
| 584 | timeToIntercept <= 0.097), | |
| 585 | (distanceToIntercept <= 7 and | |
| 586 | timeToIntercept >= 0.00000000000000000000000000000000000000000000000000000000000001 and | |
| 587 | timeToIntercept <= 0.07), | |
| 588 | (distanceToIntercept <= 7.7 and | |
| 589 | timeToIntercept >= 0.00000000000000000000000000000000000000000000000000000000000001 and | |
| 590 | timeToIntercept <= 0.077), | |
| 591 | (distanceToIntercept <= 7.5 and | |
| 592 | timeToIntercept >= 0.00000000000000000000000000000000000000000000000000000000000001 and | |
| 593 | timeToIntercept <= 0.075), | |
| 594 | (distanceToIntercept <= 7.3 and | |
| 595 | timeToIntercept >= 0.00000000000000000000000000000000000000000000000000000000000001 and | |
| 596 | timeToIntercept <= 0.073), | |
| 597 | (distanceToIntercept <= 6 and | |
| 598 | timeToIntercept >= 0.00000000000000000000000000000000000000000000000000000000000001 and | |
| 599 | timeToIntercept <= 0.06), | |
| 600 | (distanceToIntercept <= 6.5 and | |
| 601 | timeToIntercept >= 0.00000000000000000000000000000000000000000000000000000000000001 and | |
| 602 | timeToIntercept <= 0.065), | |
| 603 | (distanceToIntercept <= 6.3 and | |
| 604 | timeToIntercept >= 0.00000000000000000000000000000000000000000000000000000000000001 and | |
| 605 | timeToIntercept <= 0.063), | |
| 606 | (distanceToIntercept <= 6.7 and | |
| 607 | timeToIntercept >= 0.00000000000000000000000000000000000000000000000000000000000001 and | |
| 608 | timeToIntercept <= 0.067), | |
| 609 | (distanceToIntercept <= 5 and | |
| 610 | timeToIntercept >= 0.00000000000000000000000000000000000000000000000000000000000001 and | |
| 611 | timeToIntercept <= 0.05), | |
| 612 | (distanceToIntercept <= 5.5 and | |
| 613 | timeToIntercept >= 0.00000000000000000000000000000000000000000000000000000000000001 and | |
| 614 | timeToIntercept <= 0.055), | |
| 615 | (distanceToIntercept <= 5.3 and | |
| 616 | timeToIntercept >= 0.00000000000000000000000000000000000000000000000000000000000001 and | |
| 617 | timeToIntercept <= 0.053), | |
| 618 | (distanceToIntercept <= 5.7 and | |
| 619 | timeToIntercept >= 0.00000000000000000000000000000000000000000000000000000000000001 and | |
| 620 | timeToIntercept <= 0.057), | |
| 621 | (distanceToIntercept <= 4 and | |
| 622 | timeToIntercept >= 0.00000000000000000000000000000000000000000000000000000000000001 and | |
| 623 | timeToIntercept <= 0.04), | |
| 624 | (distanceToIntercept <= 4.3 and | |
| 625 | timeToIntercept >= 0.00000000000000000000000000000000000000000000000000000000000001 and | |
| 626 | timeToIntercept <= 0.043), | |
| 627 | (distanceToIntercept <= 4.4 and | |
| 628 | timeToIntercept >= 0.00000000000000000000000000000000000000000000000000000000000001 and | |
| 629 | timeToIntercept <= 0.044), | |
| 630 | (distanceToIntercept <= 4.5 and | |
| 631 | timeToIntercept >= 0.00000000000000000000000000000000000000000000000000000000000001 and | |
| 632 | timeToIntercept <= 0.045), | |
| 633 | (distanceToIntercept <= 4.7 and | |
| 634 | timeToIntercept >= 0.00000000000000000000000000000000000000000000000000000000000001 and | |
| 635 | timeToIntercept <= 0.047), | |
| 636 | (distanceToIntercept <= 4.8 and | |
| 637 | timeToIntercept >= 0.00000000000000000000000000000000000000000000000000000000000001 and | |
| 638 | timeToIntercept <= 0.048), | |
| 639 | (distanceToIntercept <= 4.9 and | |
| 640 | timeToIntercept >= 0.00000000000000000000000000000000000000000000000000000000000001 and | |
| 641 | timeToIntercept <= 0.049), | |
| 642 | (distanceToIntercept <= 4.3 and | |
| 643 | timeToIntercept >= 0.00000000000000000000000000000000000000000000000000000000000001 and | |
| 644 | timeToIntercept <= 0.043), | |
| 645 | (distanceToIntercept <= 3.3 and | |
| 646 | timeToIntercept >= 0.00000000000000000000000000000000000000000000000000000000000001 and | |
| 647 | timeToIntercept <= 0.033), | |
| 648 | (distanceToIntercept <= 3.5 and | |
| 649 | timeToIntercept >= 0.00000000000000000000000000000000000000000000000000000000000001 and | |
| 650 | timeToIntercept <= 0.035), | |
| 651 | (distanceToIntercept <= 3.7 and | |
| 652 | timeToIntercept >= 0.00000000000000000000000000000000000000000000000000000000000001 and | |
| 653 | timeToIntercept <= 0.037), | |
| 654 | (distanceToIntercept <= 3 and | |
| 655 | timeToIntercept >= 0.00000000000000000000000000000000000000000000000000000000000001 and | |
| 656 | timeToIntercept <= 0.03), | |
| 657 | (distanceToIntercept <= 2.5 and | |
| 658 | timeToIntercept >= 0.00000000000000000000000000000000000000000000000000000000000001 and | |
| 659 | timeToIntercept <= 0.025), | |
| 660 | (distanceToIntercept <= 2.3 and | |
| 661 | timeToIntercept >= 0.00000000000000000000000000000000000000000000000000000000000001 and | |
| 662 | timeToIntercept <= 0.023), | |
| 663 | (distanceToIntercept <= 2 and | |
| 664 | timeToIntercept >= 0.00000000000000000000000000000000000000000000000000000000000001 and | |
| 665 | timeToIntercept <= 0.02), | |
| 666 | (distanceToIntercept <= 2.7 and | |
| 667 | timeToIntercept >= 0.00000000000000000000000000000000000000000000000000000000000001 and | |
| 668 | timeToIntercept <= 0.027), | |
| 669 | (distanceToIntercept <= 2.8 and | |
| 670 | timeToIntercept >= 0.00000000000000000000000000000000000000000000000000000000000001 and | |
| 671 | timeToIntercept <= 0.028), | |
| 672 | (distanceToIntercept <= 2.9 and | |
| 673 | timeToIntercept >= 0.00000000000000000000000000000000000000000000000000000000000001 and | |
| 674 | timeToIntercept <= 0.029), | |
| 675 | (distanceToIntercept <= 1 and | |
| 676 | timeToIntercept >= 0.00000000000000000000000000000000000000000000000000000000000001 and | |
| 677 | timeToIntercept <= 0.01), | |
| 678 | (distanceToIntercept <= 1.4 and | |
| 679 | timeToIntercept >= 0.00000000000000000000000000000000000000000000000000000000000001 and | |
| 680 | timeToIntercept <= 0.014), | |
| 681 | (distanceToIntercept <= 1.6 and | |
| 682 | timeToIntercept >= 0.00000000000000000000000000000000000000000000000000000000000001 and | |
| 683 | timeToIntercept <= 0.016), | |
| 684 | (distanceToIntercept <= 1.7 and | |
| 685 | timeToIntercept >= 0.00000000000000000000000000000000000000000000000000000000000001 and | |
| 686 | timeToIntercept <= 0.017), | |
| 687 | (distanceToIntercept <= 1.5 and | |
| 688 | timeToIntercept >= 0.00000000000000000000000000000000000000000000000000000000000001 and | |
| 689 | timeToIntercept <= 0.015), | |
| 690 | (distanceToIntercept <= 1.3 and | |
| 691 | timeToIntercept >= 0.00000000000000000000000000000000000000000000000000000000000001 and | |
| 692 | timeToIntercept <= 0.013), | |
| 693 | (distanceToIntercept <= 1.2 and | |
| 694 | timeToIntercept >= 0.00000000000000000000000000000000000000000000000000000000000001 and | |
| 695 | timeToIntercept <= 0.012), | |
| 696 | (distanceToIntercept <= 1.1 and | |
| 697 | timeToIntercept >= 0.00000000000000000000000000000000000000000000000000000000000001 and | |
| 698 | timeToIntercept <= 0.011), | |
| 699 | (distanceToIntercept <= 0.1 and | |
| 700 | timeToIntercept >= 0.00000000000000000000000000000000000000000000000000000000000001 and | |
| 701 | timeToIntercept <= 0.001), | |
| 702 | (distanceToIntercept <= 0.06 and | |
| 703 | timeToIntercept >= 0.00000000000000000000000000000000000000000000000000000000000001 and | |
| 704 | timeToIntercept <= 0.006), | |
| 705 | (distanceToIntercept <= 0.07 and | |
| 706 | timeToIntercept >= 0.00000000000000000000000000000000000000000000000000000000000001 and | |
| 707 | timeToIntercept <= 0.007), | |
| 708 | (distanceToIntercept <= 0.08 and | |
| 709 | timeToIntercept >= 0.00000000000000000000000000000000000000000000000000000000000001 and | |
| 710 | timeToIntercept <= 0.008), | |
| 711 | (distanceToIntercept <= 0.011 and | |
| 712 | timeToIntercept >= 0.00000000000000000000000000000000000000000000000000000000000001 and | |
| 713 | timeToIntercept <= 0.0011), | |
| 714 | (distanceToIntercept <= 0.012 and | |
| 715 | timeToIntercept >= 0.00000000000000000000000000000000000000000000000000000000000001 and | |
| 716 | timeToIntercept <= 0.0012), | |
| 717 | (distanceToIntercept <= 0.013 and | |
| 718 | timeToIntercept >= 0.00000000000000000000000000000000000000000000000000000000000001 and | |
| 719 | timeToIntercept <= 0.0013), | |
| 720 | (distanceToIntercept <= 0.014 and | |
| 721 | timeToIntercept >= 0.00000000000000000000000000000000000000000000000000000000000001 and | |
| 722 | timeToIntercept <= 0.0014), | |
| 723 | (distanceToIntercept <= 0.015 and | |
| 724 | timeToIntercept >= 0.00000000000000000000000000000000000000000000000000000000000001 and | |
| 725 | timeToIntercept <= 0.0015), | |
| 726 | (distanceToIntercept <= 0.016 and | |
| 727 | timeToIntercept >= 0.00000000000000000000000000000000000000000000000000000000000001 and | |
| 728 | timeToIntercept <= 0.0016), | |
| 729 | (distanceToIntercept <= 0.017 and | |
| 730 | timeToIntercept >= 0.00000000000000000000000000000000000000000000000000000000000001 and | |
| 731 | timeToIntercept <= 0.0017), | |
| 732 | (distanceToIntercept <= 0.018 and | |
| 733 | timeToIntercept >= 0.00000000000000000000000000000000000000000000000000000000000001 and | |
| 734 | timeToIntercept <= 0.0018), | |
| 735 | (distanceToIntercept <= 0.009 and | |
| 736 | timeToIntercept >= 0.00000000000000000000000000000000000000000000000000000000000001 and | |
| 737 | timeToIntercept <= 0.0009), | |
| 738 | (distanceToIntercept <= 0.006 and | |
| 739 | timeToIntercept >= 0.00000000000000000000000000000000000000000000000000000000000001 and | |
| 740 | timeToIntercept <= 0.0006), | |
| 741 | (distanceToIntercept <= 0.005 and | |
| 742 | timeToIntercept >= 0.00000000000000000000000000000000000000000000000000000000000001 and | |
| 743 | timeToIntercept <= 0.0005), | |
| 744 | (distanceToIntercept <= 0.003 and | |
| 745 | timeToIntercept >= 0.00000000000000000000000000000000000000000000000000000000000001 and | |
| 746 | timeToIntercept <= 0.0003), | |
| 747 | (distanceToIntercept <= 0.001 and | |
| 748 | timeToIntercept >= 0.0000000000000000000000000000000000000000000000000000000000000000001 and | |
| 749 | timeToIntercept <= 0.0001), | |
| 750 | (distanceToIntercept <= 0.0001 and | |
| 751 | timeToIntercept >= 0.0000000000000000000000000000000000000000000000000000000000000000000001 and | |
| 752 | timeToIntercept <= 0.00001), | |
| 753 | (distanceToIntercept <= 0.0005 and | |
| 754 | timeToIntercept >= 0.000000000000000000000000000000000000000000000000000000000000000000000000001 and | |
| 755 | timeToIntercept <= 0.00005), | |
| 756 | (distanceToIntercept <= 0.00005 and | |
| 757 | timeToIntercept >= 0.0000000000000000000000000000000000000000000000000000000000000000000000000000001 and | |
| 758 | timeToIntercept <= 0.000005), | |
| 759 | (distanceToIntercept <= 0 and | |
| 760 | timeToIntercept >= | |
| 761 | 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001 and | |
| 762 | timeToIntercept <= 0.0000001) | |
| 763 | } | |
| 764 | ||
| 765 | for _, condition in pairs(conditions) do | |
| 766 | if condition then | |
| 767 | return true | |
| 768 | end | |
| 769 | end | |
| 770 | end | |
| 771 | ||
| 772 | -- Function to choose a new focused ball | |
| 773 | function chooseNewFocusedBall() | |
| 774 | local balls = workspace.Balls:GetChildren() | |
| 775 | for _, ball in ipairs(balls) do | |
| 776 | if ball:GetAttribute("realBall") ~= nil and ball:GetAttribute("realBall") == true then
| |
| 777 | return ball | |
| 778 | end | |
| 779 | end | |
| 780 | end | |
| 781 | ||
| 782 | -- Function to iterate through balls and perform actions | |
| 783 | function foreach(Ball) | |
| 784 | local focusedBall = chooseNewFocusedBall() | |
| 785 | if Ball and not Debounce then | |
| 786 | for i, v in pairs(Signal) do | |
| 787 | table.remove(Signal, i) | |
| 788 | v:Disconnect() | |
| 789 | end | |
| 790 | local function Calculation(Delta) | |
| 791 | local start, humanoidRootPart, player = os.clock(), Localplayer.Character and Localplayer.Character:FindFirstChild("HumanoidRootPart"), Players:FindFirstChild(Ball:GetAttribute("target"))
| |
| 792 | ||
| 793 | if Ball and Ball:FindFirstChild("zoomies") and Ball:GetAttribute("target") == Localplayer.Name and humanoidRootPart and not Debounce then
| |
| 794 | local timeToReachTarget = calculateProjectileTime(Ball.Position, humanoidRootPart.Position, Ball.Velocity) | |
| 795 | local distanceToTarget = calculateDistance(Ball.Position, humanoidRootPart.Position) | |
| 796 | local canParry = canObjectParry(Ball.Position, humanoidRootPart.Position, Ball.Velocity, humanoidRootPart.Velocity) | |
| 797 | ||
| 798 | if Kingston.Parrying["Auto Parry"]["Print Information"] then | |
| 799 | warn(timeToReachTarget, "Distance:", canParry) | |
| 800 | end | |
| 801 | ||
| 802 | if canParry then | |
| 803 | Parry() | |
| 804 | LastTime = LastTime | |
| 805 | Debounce = true | |
| 806 | local Signal = RunService.Stepped:Connect(function() | |
| 807 | if Kingston.Parrying["Auto Parry"]["Print Information"] then | |
| 808 | warn("False:", Ball:GetAttribute("target"), os.clock() - start, Ball, workspace.Dead:FindFirstChild(Localplayer.Name))
| |
| 809 | end | |
| 810 | if Ball:GetAttribute("target") ~= Localplayer.Name or os.clock() - start >= 1.25 or not Ball or not workspace.Alive:FindFirstChild(Localplayer.Name) then
| |
| 811 | if Kingston.Parrying["Auto Parry"]["Print Information"] then | |
| 812 | warn("Set to false")
| |
| 813 | end | |
| 814 | Debounce = false | |
| 815 | Signal:Disconnect() | |
| 816 | end | |
| 817 | end) | |
| 818 | end | |
| 819 | elseif Ball and Ball:FindFirstChild("zoomies") and Ball:GetAttribute("target") ~= Localplayer.Name and humanoidRootPart then
| |
| 820 | -- local HumanoidRootPart = Player.Character and Player.Character:FindFirstChild("HumanoidRootPart")
| |
| 821 | -- local Distance = CalculateDistance(HumanoidRootPart, Delta) | |
| 822 | LastPlayer = player | |
| 823 | end | |
| 824 | end | |
| 825 | Signal[#Signal + 1] = RunService.Stepped:Connect(Calculation) | |
| 826 | end | |
| 827 | end | |
| 828 | ||
| 829 | Localplayer.CharacterRemoving:Connect( | |
| 830 | function() | |
| 831 | if distanceVisualizer then | |
| 832 | distanceVisualizer:Destroy() | |
| 833 | distanceVisualizer = nil | |
| 834 | end | |
| 835 | end | |
| 836 | ) | |
| 837 | ||
| 838 | -- Function to initialize the auto parry | |
| 839 | function Init() | |
| 840 | Balls.ChildAdded:Connect(foreach) | |
| 841 | ||
| 842 | for _, ball in pairs(Balls:GetChildren()) do | |
| 843 | foreach(ball) | |
| 844 | end | |
| 845 | end | |
| 846 | ||
| 847 | -- Call the initialization function | |
| 848 | Init() | |
| 849 | end | |
| 850 | ||
| 851 | if Kingston.Parrying["Auto Parry"]["Face Ball"].Enabled then | |
| 852 | local function onKeyPress() | |
| 853 | local realBall = chooseNewFocusedBall() | |
| 854 | if realBall then | |
| 855 | local realBallPosition = realBall.Position | |
| 856 | workspace.CurrentCamera.CFrame = CFrame.lookAt(workspace.CurrentCamera.CFrame.Position, realBallPosition) | |
| 857 | end | |
| 858 | end | |
| 859 | ||
| 860 | local function onKeyRelease() | |
| 861 | workspace.CurrentCamera.CFrame = CFrame.new(Vector3.new(), Vector3.new(0, 0, -1)) | |
| 862 | end | |
| 863 | ||
| 864 | game:GetService("UserInputService").InputBegan:Connect(function(input, processed)
| |
| 865 | if not processed and input.KeyCode == Enum.KeyCode[Kingston.Parrying["Auto Parry"]["Face Ball"].Keybind] then | |
| 866 | onKeyPress() | |
| 867 | end | |
| 868 | end) | |
| 869 | ||
| 870 | game:GetService("UserInputService").InputEnded:Connect(function(input)
| |
| 871 | if input.KeyCode == Enum.KeyCode[Kingston.Parrying["Auto Parry"]["Face Ball"].Keybind] then | |
| 872 | onKeyRelease() | |
| 873 | end | |
| 874 | end) | |
| 875 | end | |
| 876 | ||
| 877 | if Kingston.Parrying["Auto Parry"]["Visualize Distance"].Enabled then | |
| 878 | local Playervisual = game.Players.LocalPlayer | |
| 879 | local HitboxPart = Instance.new("Part", workspace)
| |
| 880 | HitboxPart.Color = Kingston.Parrying["Auto Parry"]["Visualize Distance"].Color | |
| 881 | HitboxPart.Anchored = true | |
| 882 | HitboxPart.Material = Enum.Material.ForceField | |
| 883 | HitboxPart.Shape = Enum.PartType.Ball | |
| 884 | HitboxPart.CanCollide = false | |
| 885 | HitboxPart.CastShadow = false | |
| 886 | HitboxPart.Transparency = Kingston.Parrying["Auto Parry"]["Visualize Distance"].Transparency | |
| 887 | RunService.Stepped:Connect( | |
| 888 | function(Time, DeltaTime) | |
| 889 | for i, ball in pairs(workspace.Balls:GetChildren()) do | |
| 890 | if ball:GetAttribute("realBall") then
| |
| 891 | local ballVelocity6 = ball.Velocity | |
| 892 | local ballVolume = ball.Velocity.X + ball.Velocity.Y + ball.Velocity.Z | |
| 893 | if Visual then | |
| 894 | HitboxPart.Position = Playervisual.Character.HumanoidRootPart.Position | |
| 895 | if ballVolume >= 1 then | |
| 896 | HitboxPart.Size = Vector3.new(ballVolume, ballVolume, ballVolume) | |
| 897 | elseif ballVolume <= 5 then | |
| 898 | HitboxPart.Size = Vector3.new(15, 15, 15) | |
| 899 | else | |
| 900 | HitboxPart.Size = -Vector3.new(ballVolume, ballVolume, ballVolume) | |
| 901 | end | |
| 902 | else | |
| 903 | HitboxPart.Position = Vector3.new(0, 100000, 0) | |
| 904 | end | |
| 905 | end | |
| 906 | end | |
| 907 | end) | |
| 908 | end | |
| 909 | ||
| 910 | if Kingston.Parrying.Spamming.Enabled then | |
| 911 | local function IsTarget() | |
| 912 | local target | |
| 913 | for _, player in pairs(game:GetService("Players"):GetPlayers()) do
| |
| 914 | if player ~= game.Players.LocalPlayer and player.Character and player.Character:FindFirstChild("Highlight") then
| |
| 915 | target = player.Character.PrimaryPart | |
| 916 | end | |
| 917 | end | |
| 918 | return target | |
| 919 | end | |
| 920 | ||
| 921 | local function FireParryRemote() | |
| 922 | local args = {
| |
| 923 | [1] = 1.5, | |
| 924 | [2] = CFrame.new(-260, 120, -165, 1, 0, 0, 0, 0.9, 0.25, 0, -0.25, 0.96), | |
| 925 | [3] = {
| |
| 926 | ["266226319"] = Vector3.new(1461, 212, -112), | |
| 927 | ["3302585485"] = Vector3.new(342, 208, -141), | |
| 928 | ["4245012857"] = Vector3.new(94, 174, 81), | |
| 929 | ["908010761"] = Vector3.new(2126, 127, -51), | |
| 930 | ["641022168"] = Vector3.new(847, 265, -182), | |
| 931 | ["4490764036"] = Vector3.new(-5989, -288, -12), | |
| 932 | ["2717890843"] = Vector3.new(-514, 28, -28), | |
| 933 | ["1790608299"] = Vector3.new(70486, 12805, -0.5), | |
| 934 | ["385891491"] = Vector3.new(1073, 216, -168), | |
| 935 | ["1692348001"] = Vector3.new(639, 467, 31), | |
| 936 | ["12440631"] = Vector3.new(640, 467, 31), | |
| 937 | ["331610898"] = Vector3.new(2033, 69, -35), | |
| 938 | ["3985733703"] = Vector3.new(511, 216, -168) | |
| 939 | }, | |
| 940 | [4] = {
| |
| 941 | [1] = 1057, | |
| 942 | [2] = 296 | |
| 943 | } | |
| 944 | } | |
| 945 | ||
| 946 | if ParryRemote then | |
| 947 | ParryRemote:FireServer(unpack(args)) | |
| 948 | else | |
| 949 | NotifyLib.prompt('Error', 'Failed to get the parry remote', 2)
| |
| 950 | end | |
| 951 | end | |
| 952 | ||
| 953 | while wait() do | |
| 954 | FireParryRemote() | |
| 955 | end | |
| 956 | ||
| 957 | local function onKeyPress() | |
| 958 | local target = IsTarget() | |
| 959 | ||
| 960 | if target and target:IsA("BasePart") then
| |
| 961 | local distance = (target.Position - game.Players.LocalPlayer.Character.HumanoidRootPart.Position).Magnitude | |
| 962 | local character = player.Character | |
| 963 | if character:FindFirstChild("Humanoid") then
| |
| 964 | local humanoid = character.Humanoid | |
| 965 | if Kingston.Parrying.Spamming["Face Target"]["Require Distance"] == true and Kingston.Parrying.Spamming["Face Target"].Enabled then | |
| 966 | if distance <= Kingston.Parrying.Spamming.Distance then | |
| 967 | if humanoid.Health <= 0 then | |
| 968 | workspace.CurrentCamera.CFrame = CFrame.new(Vector3.new(), Vector3.new(0, 0, -1)) | |
| 969 | workspace.CurrentCamera.CFrame = CFrame.lookAt(workspace.CurrentCamera.CFrame.Position, target.Position) | |
| 970 | elseif Kingston.Parrying.Spamming["Face Target"]["Require Distance"] == false and Kingston.Parrying.Spamming["Face Target"].Enabled then | |
| 971 | workspace.CurrentCamera.CFrame = CFrame.lookAt(workspace.CurrentCamera.CFrame.Position, target.Position) | |
| 972 | if humanoid.Health <= 0 then | |
| 973 | workspace.CurrentCamera.CFrame = CFrame.new(Vector3.new(), Vector3.new(0, 0, -1)) | |
| 974 | end | |
| 975 | end | |
| 976 | end | |
| 977 | end | |
| 978 | end | |
| 979 | ||
| 980 | local function onKeyRelease() | |
| 981 | workspace.CurrentCamera.CFrame = CFrame.new(Vector3.new(), Vector3.new(0, 0, -1)) | |
| 982 | end | |
| 983 | ||
| 984 | UserInputService.InputBegan:Connect(function(input, processed) | |
| 985 | if not processed and input.KeyCode == Enum.KeyCode[Kingston.Parrying.Spamming["Face Target"].Keybind] then | |
| 986 | onKeyPress() | |
| 987 | end | |
| 988 | end) | |
| 989 | ||
| 990 | UserInputService.InputEnded:Connect(function(input) | |
| 991 | if input.KeyCode == Enum.KeyCode[Kingston.Parrying.Spamming["Face Target"].Keybind] then | |
| 992 | onKeyRelease() | |
| 993 | end | |
| 994 | end) | |
| 995 | ||
| 996 | spawn(function() | |
| 997 | while true do | |
| 998 | wait() | |
| 999 | local target = IsTarget() | |
| 1000 | ||
| 1001 | if target and target:IsA("BasePart") then
| |
| 1002 | local distance = (target.Position - game.Players.LocalPlayer.Character.HumanoidRootPart.Position).Magnitude | |
| 1003 | local realBall = chooseNewFocusedBall() | |
| 1004 | ||
| 1005 | if realBall then | |
| 1006 | local realBallPosition = realBall.Position | |
| 1007 | local dist2 = (realBallPosition - game.Players.LocalPlayer.Character.HumanoidRootPart.Position).Magnitude | |
| 1008 | ||
| 1009 | if distance <= Kingston.Parrying.Spamming.Distance[1] and dist2 <= Kingston.Parrying.Spamming.Distance[2] and Kingston.Parrying.Spamming.Notify then | |
| 1010 | NotifyLib.prompt('Kingston', 'Currently Spamming...', 2)
| |
| 1011 | FireParryRemote() | |
| 1012 | elseif distance <= Kingston.Parrying.Spamming.Distance[1] and dist2 <= Kingston.Parrying.Spamming.Distance[2] and not Kingston.Parrying.Spamming.Notify then | |
| 1013 | FireParryRemote() | |
| 1014 | end | |
| 1015 | else | |
| 1016 | warn("Error : chooseNewFocusedBall() returned nil")
| |
| 1017 | end | |
| 1018 | end | |
| 1019 | ||
| 1020 | if Kingston.Parrying.Spamming["Visualize Distance"].Enabled and Kingston.Parrying.Spamming["Visualize Distance"].Mode == "Display Target" then | |
| 1021 | local Size1 = Vector3.new(Kingston.Parrying.Spamming.Distance[1], Kingston.Parrying.Spamming.Distance[1], Kingston.Parrying.Spamming.Distance[1]) | |
| 1022 | local ball = Instance.new("Part", workspace)
| |
| 1023 | ball.Size = Size1 | |
| 1024 | ball.Color = Kingston.Parrying.Spamming["Visualize Distance"]["Target Display"].Color | |
| 1025 | ball.Position = game.Players.LocalPlayer.Character.HumanoidRootPart.Position | |
| 1026 | ball.Transparency = Kingston.Parrying.Spamming["Visualize Distance"]["Target Display"].Transparency | |
| 1027 | ||
| 1028 | elseif Kingston.Parrying.Spamming["Visualize Distance"].Enabled and Kingston.Parrying.Spamming["Visualize Distance"].Mode == "Display Ball" then | |
| 1029 | local Size2 = Vector3.new(Kingston.Parrying.Spamming.Distance[2], Kingston.Parrying.Spamming.Distance[2], Kingston.Parrying.Spamming.Distance[2]) | |
| 1030 | local ball = Instance.new("Part", workspace)
| |
| 1031 | ball.Size = Size2 | |
| 1032 | ball.Color = Kingston.Parrying.Spamming["Visualize Distance"]["Ball Display"].Color | |
| 1033 | ball.Position = game.Players.LocalPlayer.Character.HumanoidRootPart.Position | |
| 1034 | ball.Transparency = Kingston.Parrying.Spamming["Visualize Distance"]["Ball Display"].Transparency | |
| 1035 | ||
| 1036 | elseif Kingston.Parrying.Spamming["Visualize Distance"].Enabled and Kingston.Parrying.Spamming["Visualize Distance"].Mode == "Display Both" then | |
| 1037 | local Size1 = Vector3.new(Kingston.Parrying.Spamming.Distance[1], Kingston.Parrying.Spamming.Distance[1], Kingston.Parrying.Spamming.Distance[1]) | |
| 1038 | local ball = Instance.new("Part", workspace)
| |
| 1039 | ball.Size = Size1 | |
| 1040 | ball.Color = Kingston.Parrying.Spamming["Visualize Distance"]["Target Display"].Color | |
| 1041 | ball.Position = game.Players.LocalPlayer.Character.HumanoidRootPart.Position | |
| 1042 | ball.Transparency = Kingston.Parrying.Spamming["Visualize Distance"]["Target Display"].Transparency | |
| 1043 | local Size2 = Vector3.new(Kingston.Parrying.Spamming.Distance[2], Kingston.Parrying.Spamming.Distance[2], Kingston.Parrying.Spamming.Distance[2]) | |
| 1044 | local ball = Instance.new("Part", workspace)
| |
| 1045 | ball.Size = Size2 | |
| 1046 | ball.Color = Kingston.Parrying.Spamming["Visualize Distance"]["Ball Display"].Color | |
| 1047 | ball.Position = game.Players.LocalPlayer.Character.HumanoidRootPart.Position | |
| 1048 | ball.Transparency = Kingston.Parrying.Spamming["Visualize Distance"]["Ball Display"].Transparency | |
| 1049 | end | |
| 1050 | end | |
| 1051 | end) | |
| 1052 | end | |
| 1053 | end | |
| 1054 | ||
| 1055 | if Kingston["Force Target"].Enabled then | |
| 1056 | local Highlight = Instance.new("SurfaceGui")
| |
| 1057 | Highlight.Name = "TargetHighlight" | |
| 1058 | Highlight.Face = Enum.NormalId.Front | |
| 1059 | Highlight.LightInfluence = 0 | |
| 1060 | Highlight.Parent = game.Players | |
| 1061 | ||
| 1062 | function findClosestPlayer(position) | |
| 1063 | local PlayerPosition = Localplayer.Character and Localplayer.Character:FindFirstChild("HumanoidRootPart") and Localplayer.Character.HumanoidRootPart.Position
| |
| 1064 | if not PlayerPosition then | |
| 1065 | return nil | |
| 1066 | end | |
| 1067 | ||
| 1068 | local ClosestPlayer = nil | |
| 1069 | local ClosestDistance = math.huge | |
| 1070 | ||
| 1071 | for _, OtherPlayer in pairs(game.Players:GetPlayers()) do | |
| 1072 | if OtherPlayer ~= Localplayer then | |
| 1073 | local Character = OtherPlayer.Character | |
| 1074 | if Character and Character:FindFirstChild("HumanoidRootPart") then
| |
| 1075 | local Distance = (position - Character.HumanoidRootPart.Position).magnitude | |
| 1076 | if Distance < ClosestDistance then | |
| 1077 | ClosestDistance = Distance | |
| 1078 | ClosestPlayer = OtherPlayer | |
| 1079 | end | |
| 1080 | end | |
| 1081 | end | |
| 1082 | end | |
| 1083 | ||
| 1084 | return ClosestPlayer | |
| 1085 | end | |
| 1086 | ||
| 1087 | function onKeyPress() | |
| 1088 | if not RadiusEnabled then | |
| 1089 | local TargetPosition = Vector3.new(0, 0, 0) | |
| 1090 | local Target = findClosestPlayer(TargetPosition) | |
| 1091 | ||
| 1092 | highlightAdornee(Target) | |
| 1093 | else | |
| 1094 | RadiusEnabled = not RadiusEnabled | |
| 1095 | ||
| 1096 | Highlight.Adornee = nil | |
| 1097 | end | |
| 1098 | end | |
| 1099 | ||
| 1100 | function highlightAdornee(Target) | |
| 1101 | if Target then | |
| 1102 | local Adornee = Target.Character and Target.Character:FindFirstChild("HumanoidRootPart")
| |
| 1103 | if Adornee then | |
| 1104 | Highlight.Adornee = Adornee | |
| 1105 | if ShowTargetEnabled then | |
| 1106 | showTarget(Adornee) | |
| 1107 | end | |
| 1108 | end | |
| 1109 | end | |
| 1110 | end | |
| 1111 | ||
| 1112 | function isPlayerInRadius(position) | |
| 1113 | if not RadiusEnabled then | |
| 1114 | return true | |
| 1115 | end | |
| 1116 | ||
| 1117 | local PlayerScreenPos = Vector2.new(Camera.ViewportSize.X / 2, Camera.ViewportSize.Y / 2) | |
| 1118 | local PlayerX = PlayerScreenPos.X | |
| 1119 | local PlayerY = PlayerScreenPos.Y | |
| 1120 | ||
| 1121 | local MouseX = Mouse.X | |
| 1122 | local MouseY = Mouse.Y | |
| 1123 | ||
| 1124 | local LeftX = MouseX - RadiusSize[1] / 2 | |
| 1125 | local RightX = MouseX + RadiusSize[1] / 2 | |
| 1126 | local TopY = MouseY - RadiusSize[2] / 2 | |
| 1127 | local BottomY = MouseY + RadiusSize[2] / 2 | |
| 1128 | ||
| 1129 | return PlayerX >= LeftX and PlayerX <= RightX and PlayerY >= TopY and PlayerY <= BottomY | |
| 1130 | end | |
| 1131 | ||
| 1132 | function showTarget(Adornee) | |
| 1133 | if ShowTargetType == "Highlight" then | |
| 1134 | local highlightSurface = Instance.new("SurfaceGui")
| |
| 1135 | highlightSurface.Parent = Adornee | |
| 1136 | highlightSurface.Face = Enum.NormalId.Back | |
| 1137 | highlightSurface.LightInfluence = 0 | |
| 1138 | highlightSurface.ZIndexBehavior = Enum.ZIndexBehavior.Sibling | |
| 1139 | ||
| 1140 | local highlightFrame = Instance.new("Frame")
| |
| 1141 | highlightFrame.Size = UDim2.new(2, 0, 2, 0) | |
| 1142 | highlightFrame.BackgroundColor3 = Kingston["Force Target"]["Show Target"]["Color"] | |
| 1143 | highlightFrame.BackgroundTransparency = Kingston["Force Target"]["Show Target"]["Transparency"] | |
| 1144 | highlightFrame.BorderSizePixel = 0 | |
| 1145 | highlightFrame.Parent = highlightSurface | |
| 1146 | end | |
| 1147 | end | |
| 1148 | ||
| 1149 | function updateFacing() | |
| 1150 | local Target = findClosestPlayer(Vector3.new(0, 0, 0)) | |
| 1151 | if Target then | |
| 1152 | local TargetPosition = Target.Character.HumanoidRootPart.Position | |
| 1153 | local LookVector = (TargetPosition - Localplayer.Character.HumanoidRootPart.Position).unit | |
| 1154 | Localplayer.Character:SetPrimaryPartCFrame(CFrame.new(Localplayer.Character.HumanoidRootPart.Position, Localplayer.Character.HumanoidRootPart.Position + Vector3.new(LookVector.x, 0, LookVector.z))) | |
| 1155 | ||
| 1156 | local PlayerPosition = Localplayer.Character.HumanoidRootPart.Position | |
| 1157 | local CameraLookAt = PlayerPosition + Vector3.new(LookVector.x, 0, LookVector.z) | |
| 1158 | local CameraCFrame = CFrame.new(PlayerPosition, CameraLookAt) | |
| 1159 | Camera.CFrame = CameraCFrame | |
| 1160 | end | |
| 1161 | end | |
| 1162 | ||
| 1163 | UserInputService.InputBegan:Connect(function(Input, GameProcessed) | |
| 1164 | if not GameProcessed and Input.KeyCode == Enum.Keycode[Keybind] then | |
| 1165 | onKeyPress() | |
| 1166 | end | |
| 1167 | end) | |
| 1168 | ||
| 1169 | RunService.Heartbeat:Connect(function() | |
| 1170 | updateFacing() | |
| 1171 | end) | |
| 1172 | end | |
| 1173 | ||
| 1174 | if Kingston["Misc"].Mod.Enabled then | |
| 1175 | local isGroupGame = function() | |
| 1176 | return MarketplaceService:GetProductInfo(game.PlaceId).Creator.CreatorType == 'Group' | |
| 1177 | end | |
| 1178 | ||
| 1179 | local creatorID, groupID | |
| 1180 | ||
| 1181 | if isGroupGame() then | |
| 1182 | groupID = GroupService:GetGroupInfoAsync(MarketplaceService:GetProductInfo(game.PlaceId).Creator.CreatorTargetId).Id | |
| 1183 | else | |
| 1184 | creatorID = game.CreatorId | |
| 1185 | end | |
| 1186 | ||
| 1187 | if creatorID then | |
| 1188 | for _, player in ipairs(Players:GetPlayers()) do | |
| 1189 | if player.UserId == creatorID then | |
| 1190 | task.wait(Kingston["Misc"].Mod.Delay) | |
| 1191 | if string.lower(Kingston["Misc"].Mod.OnJoin) == "Kick" then | |
| 1192 | Players.LocalPlayer:Kick(Kingston["Misc"].Mod.Notification) | |
| 1193 | elseif string.lower(Kingston["Misc"].Mod.OnJoin) == "Notify" then | |
| 1194 | NotifyLib.prompt('Kingston', Kingston["Misc"].Mod.Notification, 2)
| |
| 1195 | end | |
| 1196 | end | |
| 1197 | end | |
| 1198 | elseif groupID then | |
| 1199 | for _, player in ipairs(Players:GetPlayers()) do | |
| 1200 | if player:IsInGroup(groupID) and player:GetRankInGroup(groupID) >= Kingston["Misc"].Mod.Rank then | |
| 1201 | if string.lower(Kingston["Misc"].Mod.OnJoin) == "Kick" then | |
| 1202 | Players.LocalPlayer:Kick(Kingston["Misc"].Mod.Notification) | |
| 1203 | elseif string.lower(Kingston["Misc"].Mod.OnJoin) == "Notify" then | |
| 1204 | NotifyLib.prompt('Kingston', Kingston["Misc"].Mod.Notification, 2)
| |
| 1205 | end | |
| 1206 | end | |
| 1207 | task.wait(1) | |
| 1208 | end | |
| 1209 | end | |
| 1210 | task.wait() | |
| 1211 | end | |
| 1212 | ||
| 1213 | if Kingston["Ability Spammer"].Enabled then | |
| 1214 | local function toggleSus() | |
| 1215 | sus = not sus | |
| 1216 | if sus then | |
| 1217 | NotifyLib.prompt('Kingston', 'Ability Spammer | Enabled', 2)
| |
| 1218 | while sus do | |
| 1219 | game:GetService("ReplicatedStorage"):WaitForChild("Remotes"):WaitForChild(Kingston["Ability Spammer"].Ability):FireServer()
| |
| 1220 | wait() | |
| 1221 | end | |
| 1222 | else | |
| 1223 | NotifyLib.prompt('Kingston', 'Ability Spammer | Disabled', 2)
| |
| 1224 | end | |
| 1225 | end | |
| 1226 | ||
| 1227 | UserInputService.InputBegan:Connect(function(input, gameProcessed) | |
| 1228 | if not gameProcessed and input.KeyCode == Enum.KeyCode[Kingston["Ability Spammer"].Keybind] then | |
| 1229 | toggleSus() | |
| 1230 | end | |
| 1231 | end) | |
| 1232 | end | |
| 1233 | ||
| 1234 | if Kingston["Misc"].MemSpoofer.Enabled then | |
| 1235 | if PerformanceStats then | |
| 1236 | local function spoofMemory() | |
| 1237 | Builders.Memory = tonumber(string.format("%.2f", math.random() + math.random(-1, 1)))
| |
| 1238 | ||
| 1239 | if Builders.Memory < math.random(Kingston["Misc"].MemSpoofer.Range[1], Kingston["Misc"].MemSpoofer.Range[2]) then | |
| 1240 | Builders.Memory = math.random() + math.random(1, 2) | |
| 1241 | elseif Builders.Memory > math.random(Kingston["Misc"].MemSpoofer.Range[1] - math.random(10, 40), Kingston["Misc"].MemSpoofer.Range[2] - math.random(10, 30)) then | |
| 1242 | Builders.Memory = math.random() + math.random(1, 2) | |
| 1243 | end | |
| 1244 | end | |
| 1245 | ||
| 1246 | -- Method 1 | |
| 1247 | if Kingston["Misc"].MemSpoofer.Method == "1" then | |
| 1248 | for _, key in pairs(PerformanceStats:GetDescendants()) do | |
| 1249 | if key:IsA("TextLabel") and key.Text == "Mem" then
| |
| 1250 | spoofMemory() | |
| 1251 | key.Parent.ValueLabel.Text = string.format("%.2f MB", Builders.Memory)
| |
| 1252 | end | |
| 1253 | end | |
| 1254 | ||
| 1255 | if PerformanceStats:FindFirstChild("PS_Viewer") then
| |
| 1256 | for _, key in pairs(PerformanceStats:FindFirstChild("PS_Viewer"):GetDescendants()) do
| |
| 1257 | if key:IsA("TextLabel") and string.find(key.Text, "Current") then
| |
| 1258 | key.Text = string.format("Current: %.2f MB", Builders.Memory)
| |
| 1259 | elseif key:IsA("TextLabel") and string.find(key.Text, "Average") then
| |
| 1260 | key.Text = string.format("Average: %.2f MB", Builders.Memory - (math.random() * 1.45))
| |
| 1261 | end | |
| 1262 | end | |
| 1263 | end | |
| 1264 | ||
| 1265 | elseif Kingston["Misc"].MemSpoofer.Method == "0" then | |
| 1266 | for _, key in pairs(PerformanceStats:GetDescendants()) do | |
| 1267 | if key:IsA("TextLabel") and key.Text == "Mem" then
| |
| 1268 | if not Builders.Connections.CACHE_MEMORY.Spoofer1 then | |
| 1269 | Builders.Connections.CACHE_MEMORY.Spoofer1 = key.Parent.ValueLabel:GetPropertyChangedSignal("Text"):Connect(function()
| |
| 1270 | if Kingston["Misc"].MemSpoofer.Enabled then | |
| 1271 | spoofMemory() | |
| 1272 | key.Parent.ValueLabel.Text = string.format("%.2f MB", Builders.Memory)
| |
| 1273 | task.wait(Kingston["Misc"].MemSpoofer.Delay) | |
| 1274 | end | |
| 1275 | end) | |
| 1276 | end | |
| 1277 | end | |
| 1278 | end | |
| 1279 | ||
| 1280 | if PerformanceStats:FindFirstChild("PS_Viewer") then
| |
| 1281 | for _, key in pairs(PerformanceStats:FindFirstChild("PS_Viewer"):GetDescendants()) do
| |
| 1282 | if key:IsA("TextLabel") and string.find(key.Text, "Current") then
| |
| 1283 | if not Builders.Connections.CACHE_MEMORY.Current then | |
| 1284 | Builders.Connections.CACHE_MEMORY.Current = key:GetPropertyChangedSignal("Text"):Connect(function()
| |
| 1285 | key.Text = string.format("Current: %.2f MB", Builders.Memory)
| |
| 1286 | task.wait(Kingston["Misc"].MemSpoofer.Delay) | |
| 1287 | end) | |
| 1288 | end | |
| 1289 | elseif key:IsA("TextLabel") and string.find(key.Text, "Average") then
| |
| 1290 | if not Builders.Connections.CACHE_MEMORY.Avg then | |
| 1291 | Builders.Connections.CACHE_MEMORY.Avg = key:GetPropertyChangedSignal("Text"):Connect(function()
| |
| 1292 | key.Text = string.format("Average: %.2f MB", Builders.Memory + math.random())
| |
| 1293 | task.wait(Kingston["Misc"].MemSpoofer.Delay) | |
| 1294 | end) | |
| 1295 | end | |
| 1296 | end | |
| 1297 | end | |
| 1298 | end | |
| 1299 | end | |
| 1300 | end | |
| 1301 | ||
| 1302 | if DevConsole then | |
| 1303 | for _, key in pairs(DevConsole:GetDescendants()) do | |
| 1304 | if key:IsA("TextButton") and key.Name == "MemoryUsage_MB" then
| |
| 1305 | if Kingston["Misc"].MemSpoofer.Method == "1" then | |
| 1306 | key.Text = string.format("%.0f MB", tonumber(Builders.Memory))
| |
| 1307 | elseif Kingston["Misc"].MemSpoofer.Method == "0" then | |
| 1308 | if not Builders.Connections.CACHE_MEMORY.DevConsole then | |
| 1309 | Builders.Connections.CACHE_MEMORY.DevConsole = key:GetPropertyChangedSignal("Text"):Connect(function()
| |
| 1310 | key.Text = string.format("%.2f MB", tonumber(Builders.Memory))
| |
| 1311 | task.wait(Kingston["Misc"].MemSpoofer.Delay) | |
| 1312 | end) | |
| 1313 | end | |
| 1314 | end | |
| 1315 | end | |
| 1316 | end | |
| 1317 | end | |
| 1318 | end | |
| 1319 | ||
| 1320 | ||
| 1321 | if Kingston["Misc"].Movement.Enabled and Kingston["Misc"].Movement.Mode == "CFrame" then | |
| 1322 | local MovementEnabled = ingston["Misc"].Movement.Enabled | |
| 1323 | local Multiplier = getgenv().Kingston.Misc.Movement.SpeedValue | |
| 1324 | ||
| 1325 | repeat | |
| 1326 | wait() | |
| 1327 | until LocalPlayer.Character and LocalPlayer.Character:FindFirstChild("Humanoid") and LocalPlayer.Character:FindFirstChild("HumanoidRootPart")
| |
| 1328 | ||
| 1329 | local HumanoidRootPart = LocalPlayer.Character:WaitForChild("HumanoidRootPart")
| |
| 1330 | ||
| 1331 | UserInputService.InputBegan:Connect(function(input, gameProcessedEvent) | |
| 1332 | if not gameProcessedEvent and input.KeyCode == Enum.KeyCode[getgenv().Kingston.Misc.Movement.Keybind] then | |
| 1333 | MovementEnabled = not MovementEnabled | |
| 1334 | if MovementEnabled then | |
| 1335 | repeat | |
| 1336 | HumanoidRootPart.CFrame = HumanoidRootPart.CFrame + | |
| 1337 | LocalPlayer.Character.Humanoid.MoveDirection * Multiplier | |
| 1338 | RunService.Stepped:Wait() | |
| 1339 | until not MovementEnabled | |
| 1340 | end | |
| 1341 | end | |
| 1342 | end) | |
| 1343 | elseif Kingston["Misc"].Movement.Enabled and Kingston["Misc"].Movement.Mode == "Humanoid.WS" then | |
| 1344 | repeat | |
| 1345 | wait() | |
| 1346 | until Localplayer.Character | |
| 1347 | ||
| 1348 | local WalkspeedEnabled = true | |
| 1349 | getgenv().WalkspeedMultiplier = Kingston["Misc"].Movement["Speed Value"] | |
| 1350 | ||
| 1351 | UserInputService.InputBegan:connect(function(input) | |
| 1352 | if input.KeyCode == Enum.KeyCode[Kingston["Misc"].Movement.Keybind] then | |
| 1353 | WalkspeedEnabled = not WalkspeedEnabled | |
| 1354 | if WalkspeedEnabled then | |
| 1355 | repeat | |
| 1356 | Localplayer.Character.Humanoid.WalkSpeed = getgenv().WalkspeedMultiplier | |
| 1357 | RunService.Stepped:wait() | |
| 1358 | until not WalkspeedEnabled | |
| 1359 | else | |
| 1360 | Localplayer.Character.Humanoid.WalkSpeed = Kingston["Misc"].Movement.DefaultWS | |
| 1361 | end | |
| 1362 | end | |
| 1363 | end) | |
| 1364 | end | |
| 1365 | end | |
| 1366 | ||
| 1367 | ParryRemote.OnClientEvent:Connect(function(player) | |
| 1368 | if Kingston.Misc.HitSound.Enabled then | |
| 1369 | local sound = Instance.new("Sound")
| |
| 1370 | ||
| 1371 | if Kingston.Misc.HitSound.Sound == "Bameware" then | |
| 1372 | sound.SoundId = "rbxassetid://3124331820" | |
| 1373 | elseif Kingston.Misc.HitSound.Sound == "Skeet" then | |
| 1374 | sound.SoundId = "rbxassetid://4753603610" | |
| 1375 | elseif Kingston.Misc.HitSound.Sound == "Bonk" then | |
| 1376 | sound.SoundId = "rbxassetid://3765689841" | |
| 1377 | elseif Kingston.Misc.HitSound.Sound == "Lazer Beam" then | |
| 1378 | sound.SoundId = "rbxassetid://130791043" | |
| 1379 | elseif Kingston.Misc.HitSound.Sound == "Windows XP Error" then | |
| 1380 | sound.SoundId = "rbxassetid://160715357" | |
| 1381 | elseif Kingston.Misc.HitSound.Sound == "TF2 Hitsound" then | |
| 1382 | sound.SoundId = "rbxassetid://3455144981" | |
| 1383 | elseif Kingston.Misc.HitSound.Sound == "TF2 Critical" then | |
| 1384 | sound.SoundId = "rbxassetid://296102734" | |
| 1385 | elseif Kingston.Misc.HitSound.Sound == "TF2 Bat" then | |
| 1386 | sound.SoundId = "rbxassetid://3333907347" | |
| 1387 | elseif Kingston.Misc.HitSound.Sound == 'Bow Hit' then | |
| 1388 | sound.SoundId = "rbxassetid://1053296915" | |
| 1389 | elseif Kingston.Misc.HitSound.Sound == 'Bow' then | |
| 1390 | sound.SoundId = "rbxassetid://3442683707" | |
| 1391 | elseif Kingston.Misc.HitSound.Sound == 'OSU' then | |
| 1392 | sound.SoundId = "rbxassetid://7147454322" | |
| 1393 | elseif Kingston.Misc.HitSound.Sound == 'Minecraft Hit' then | |
| 1394 | sound.SoundId = "rbxassetid://4018616850" | |
| 1395 | elseif Kingston.Misc.HitSound.Sound == 'Steve' then | |
| 1396 | sound.SoundId = "rbxassetid://5869422451" | |
| 1397 | elseif Kingston.Misc.HitSound.Sound == '1nn' then | |
| 1398 | sound.SoundId = "rbxassetid://7349055654" | |
| 1399 | elseif Kingston.Misc.HitSound.Sound == 'Rust' then | |
| 1400 | sound.SoundId = "rbxassetid://3744371091" | |
| 1401 | elseif Kingston.Misc.HitSound.Sound == "TF2 Pan" then | |
| 1402 | sound.SoundId = "rbxassetid://3431749479" | |
| 1403 | elseif Kingston.Misc.HitSound.Sound == "Neverlose" then | |
| 1404 | sound.SoundId = "rbxassetid://8679627751" | |
| 1405 | elseif Kingston.Misc.HitSound.Sound == "Mario" then | |
| 1406 | sound.SoundId = "rbxassetid://5709456554" | |
| 1407 | ||
| 1408 | end | |
| 1409 | ||
| 1410 | local humanoidRootPart = player.Character:FindFirstChild("HumanoidRootPart")
| |
| 1411 | sound.Parent = humanoidRootPart or player.Character | |
| 1412 | sound.Volume = Kingston.Misc.HitSound.Volume | |
| 1413 | sound.Pitch = Kingston.Misc.HitSound.Pitch | |
| 1414 | sound:Play() | |
| 1415 | end | |
| 1416 | end) | |
| 1417 | ||
| 1418 | if Kingston["Misc"].Skybox.Enabled then | |
| 1419 | task.wait() | |
| 1420 | if Kingston["Misc"].Skybox.Enabled and Kingston["Misc"].Skybox.Type == "Pink Sky" then | |
| 1421 | Light["ClockTime"] = "12"; | |
| 1422 | game:GetService("Lighting").Sky.SkyboxBk = "http://www.roblox.com/asset/?id=1279987105"
| |
| 1423 | game:GetService("Lighting").Sky.SkyboxDn = "http://www.roblox.com/asset/?id=1279987105"
| |
| 1424 | game:GetService("Lighting").Sky.SkyboxFt = "http://www.roblox.com/asset/?id=1279987105"
| |
| 1425 | game:GetService("Lighting").Sky.SkyboxLf = "http://www.roblox.com/asset/?id=1279987105"
| |
| 1426 | game:GetService("Lighting").Sky.SkyboxRt = "http://www.roblox.com/asset/?id=1279987105"
| |
| 1427 | game:GetService("Lighting").Sky.SkyboxUp = "http://www.roblox.com/asset/?id=1279987105"
| |
| 1428 | elseif Kingston["Misc"].Skybox.Type == "Red Sky" then | |
| 1429 | Light["ClockTime"] = "12"; | |
| 1430 | game:GetService("Lighting").Sky.SkyboxBk = "http://www.roblox.com/asset/?id=2571711090"
| |
| 1431 | game:GetService("Lighting").Sky.SkyboxDn = "http://www.roblox.com/asset/?id=2571711090"
| |
| 1432 | game:GetService("Lighting").Sky.SkyboxFt = "http://www.roblox.com/asset/?id=2571711090"
| |
| 1433 | game:GetService("Lighting").Sky.SkyboxLf = "http://www.roblox.com/asset/?id=2571711090"
| |
| 1434 | game:GetService("Lighting").Sky.SkyboxRt = "http://www.roblox.com/asset/?id=2571711090"
| |
| 1435 | game:GetService("Lighting").Sky.SkyboxUp = "http://www.roblox.com/asset/?id=2571711090"
| |
| 1436 | elseif Kingston["Misc"].Skybox.Type == "Nebula" then | |
| 1437 | Light["ClockTime"] = "12"; | |
| 1438 | game:GetService("Lighting").Sky.SkyboxBk = "rbxassetid://6277563515"
| |
| 1439 | game:GetService("Lighting").Sky.SkyboxDn = "rbxassetid://6277565742"
| |
| 1440 | game:GetService("Lighting").Sky.SkyboxFt = "rbxassetid://6277567481"
| |
| 1441 | game:GetService("Lighting").Sky.SkyboxLf = "rbxassetid://6277569562"
| |
| 1442 | game:GetService("Lighting").Sky.SkyboxRt = "rbxassetid://6277583250"
| |
| 1443 | game:GetService("Lighting").Sky.SkyboxUp = "rbxassetid://6277586065"
| |
| 1444 | elseif Kingston["Misc"].Skybox.Type == "Dark Night" then | |
| 1445 | Light["ClockTime"] = "12"; | |
| 1446 | game:GetService("Lighting").Sky.SkyboxBk = "rbxassetid://6285719338"
| |
| 1447 | game:GetService("Lighting").Sky.SkyboxDn = "rbxassetid://6285721078"
| |
| 1448 | game:GetService("Lighting").Sky.SkyboxFt = "rbxassetid://6285722964"
| |
| 1449 | game:GetService("Lighting").Sky.SkyboxLf = "rbxassetid://6285724682"
| |
| 1450 | game:GetService("Lighting").Sky.SkyboxRt = "rbxassetid://6285726335"
| |
| 1451 | game:GetService("Lighting").Sky.SkyboxUp = "rbxassetid://6285730635"
| |
| 1452 | elseif Kingston["Misc"].Skybox.Type == "Space" then | |
| 1453 | Light["ClockTime"] = "12"; | |
| 1454 | game:GetService("Lighting").Sky.SkyboxBk = "rbxassetid://877168885"
| |
| 1455 | game:GetService("Lighting").Sky.SkyboxDn = "rbxassetid://877169070"
| |
| 1456 | game:GetService("Lighting").Sky.SkyboxFt = "rbxassetid://877169154"
| |
| 1457 | game:GetService("Lighting").Sky.SkyboxLf = "rbxassetid://877169233"
| |
| 1458 | game:GetService("Lighting").Sky.SkyboxRt = "rbxassetid://877169317"
| |
| 1459 | game:GetService("Lighting").Sky.SkyboxUp = "rbxassetid://877169431"
| |
| 1460 | elseif Kingston["Misc"].Skybox.Type == "Purple Sky" then | |
| 1461 | Light["ClockTime"] = "12"; | |
| 1462 | game:GetService("Lighting").Sky.SkyboxBk = "http://www.roblox.com/asset/?id=9971120429"
| |
| 1463 | game:GetService("Lighting").Sky.SkyboxDn = "http://www.roblox.com/asset/?id=9971120429"
| |
| 1464 | game:GetService("Lighting").Sky.SkyboxFt = "http://www.roblox.com/asset/?id=9971120429"
| |
| 1465 | game:GetService("Lighting").Sky.SkyboxLf = "http://www.roblox.com/asset/?id=9971120429"
| |
| 1466 | game:GetService("Lighting").Sky.SkyboxRt = "http://www.roblox.com/asset/?id=9971120429"
| |
| 1467 | game:GetService("Lighting").Sky.SkyboxUp = "http://www.roblox.com/asset/?id=9971120429"
| |
| 1468 | elseif Kingston["Misc"].Skybox.Type == "Green Sky" then | |
| 1469 | Light["ClockTime"] = "12"; | |
| 1470 | game:GetService("Lighting").Sky.SkyboxBk = "http://www.roblox.com/asset/?id=8754359769"
| |
| 1471 | game:GetService("Lighting").Sky.SkyboxDn = "http://www.roblox.com/asset/?id=8754359769"
| |
| 1472 | game:GetService("Lighting").Sky.SkyboxFt = "http://www.roblox.com/asset/?id=8754359769"
| |
| 1473 | game:GetService("Lighting").Sky.SkyboxLf = "http://www.roblox.com/asset/?id=8754359769"
| |
| 1474 | game:GetService("Lighting").Sky.SkyboxRt = "http://www.roblox.com/asset/?id=8754359769"
| |
| 1475 | game:GetService("Lighting").Sky.SkyboxUp = "http://www.roblox.com/asset/?id=8754359769"
| |
| 1476 | end | |
| 1477 | end | |
| 1478 | ||
| 1479 | if Kingston["Misc"]["TargetStrafe"].Enabled then | |
| 1480 | local function IsTarget() | |
| 1481 | local target | |
| 1482 | for _, player in pairs(game:GetService("Players"):GetPlayers()) do
| |
| 1483 | if player ~= game.Players.LocalPlayer and player.Character and player.Character:FindFirstChild("Highlight") then
| |
| 1484 | target = player.Character.PrimaryPart | |
| 1485 | end | |
| 1486 | end | |
| 1487 | return target | |
| 1488 | end | |
| 1489 | ||
| 1490 | local function UpdateTargetStrafe() | |
| 1491 | if Kingston["Misc"]["TargetStrafe"].Enabled then | |
| 1492 | local target = IsTarget() | |
| 1493 | ||
| 1494 | if target then | |
| 1495 | angle_Y = angle_Y + RunService.RenderStepped:Wait() / Kingston["Misc"]["TargetStrafe"].Speed % 1 | |
| 1496 | local LocalPlayer = game.Players.LocalPlayer | |
| 1497 | LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(target.Position) * CFrame.Angles(0, 2 * math.pi * angle_Y, 0) * CFrame.new(0, Kingston["Misc"]["TargetStrafe"].Height, Kingston["Misc"]["TargetStrafe"].Distance) | |
| 1498 | end | |
| 1499 | end | |
| 1500 | end | |
| 1501 | ||
| 1502 | RunService.RenderStepped:Connect(UpdateTargetStrafe) | |
| 1503 | ||
| 1504 | UserInputService.InputBegan:Connect(function(input, gameProcessedEvent) | |
| 1505 | if not gameProcessedEvent and input.UserInputType == Enum.UserInputType.Keyboard and input.KeyCode == Enum.Keycode[Kingston["Misc"]["TargetStrafe"].Keybind] then | |
| 1506 | -- Toggle TargetStrafe on key press | |
| 1507 | Kingston["Misc"]["TargetStrafe"].Enabled = not Kingston["Misc"]["TargetStrafe"].Enabled | |
| 1508 | end | |
| 1509 | end) | |
| 1510 | ||
| 1511 | -- Visualization | |
| 1512 | if Kingston["Misc"]["TargetStrafe"].Visualize.Enabled then | |
| 1513 | local targetStrafeRangePart = Instance.new("Part", workspace)
| |
| 1514 | targetStrafeRangePart.Size = Vector3.new(Kingston["Misc"]["TargetStrafe"].Distance * 0.7, 0.01, Kingston["Misc"]["TargetStrafe"].Distance * 0.7) | |
| 1515 | targetStrafeRangePart.Anchored = true | |
| 1516 | targetStrafeRangePart.CanCollide = false | |
| 1517 | targetStrafeRangePart.Transparency = Kingston["Misc"]["TargetStrafe"].Visualize.Transparency | |
| 1518 | ||
| 1519 | local function UpdateVisualize() | |
| 1520 | if Kingston["Misc"]["TargetStrafe"].Visualize.Enabled and Kingston["Misc"]["TargetStrafe"].Enabled then | |
| 1521 | targetStrafeRangePart.CFrame = CFrame.new(TargetTarget.Character.HumanoidRootPart.Position) | |
| 1522 | targetStrafeRangePart.Color = Kingston["Misc"]["TargetStrafe"].Visualize.Color | |
| 1523 | else | |
| 1524 | targetStrafeRangePart.CFrame = CFrame.new(0, 9999, 0) | |
| 1525 | end | |
| 1526 | end | |
| 1527 | ||
| 1528 | RunService.RenderStepped:Connect(UpdateVisualize) | |
| 1529 | end | |
| 1530 | end | |
| 1531 | ||
| 1532 | local function updateFeatures() | |
| 1533 | if Kingston["Misc"]["Lighting"]["Enabled"] then | |
| 1534 | if Kingston["Misc"]["Lighting"]["Remove Fog"] then | |
| 1535 | Light.Fog = 0 | |
| 1536 | end | |
| 1537 | ||
| 1538 | if Kingston["Misc"]["Lighting"]["Remove Grass"] then | |
| 1539 | for _, obj in pairs(workspace:GetDescendants()) do | |
| 1540 | if obj:IsA("Terrain") then
| |
| 1541 | obj.Material = Enum.Material.SmoothPlastic | |
| 1542 | end | |
| 1543 | end | |
| 1544 | end | |
| 1545 | ||
| 1546 | if Kingston["Misc"]["Lighting"]["Water %"][1] then | |
| 1547 | local water = workspace:FindFirstChild("Water")
| |
| 1548 | if water then | |
| 1549 | water.Transparency = Kingston["Misc"]["Lighting"]["Water %"][2] / 100 | |
| 1550 | water.Color = Kingston["Misc"]["Lighting"]["Water %"][3] | |
| 1551 | end | |
| 1552 | end | |
| 1553 | end | |
| 1554 | end | |
| 1555 | updateFeatures() | |
| 1556 | ||
| 1557 | while Kingston.Misc["Sword Grip"].Enabled do | |
| 1558 | game:GetService("RunService").Stepped:wait()
| |
| 1559 | local tool = game.Players.LocalPlayer.Character:FindFirstChildOfClass("Tool")
| |
| 1560 | tool.GripPos = Vector3.new( | |
| 1561 | Kingston.Misc["Sword Grip"].Values["Side"], | |
| 1562 | Kingston.Misc["Sword Grip"].Values["Height"], | |
| 1563 | Kingston.Misc["Sword Grip"].Values["Front"] | |
| 1564 | ) | |
| 1565 | end | |
| 1566 | ||
| 1567 | if Kingston.Misc["Sword Grip"]["Delete Sword"] then | |
| 1568 | tool.GripPos = Vector3.new( | |
| 1569 | Kingston.Misc["Sword Grip"].Values["Side"] == 10000, | |
| 1570 | Kingston.Misc["Sword Grip"].Values["Height"] == 10000, | |
| 1571 | Kingston.Misc["Sword Grip"].Values["Front"] == 10000 | |
| 1572 | ) | |
| 1573 | end | |
| 1574 | ||
| 1575 | if Kingston.Misc["Sword Grip"].Enabled == false then | |
| 1576 | local tool = game.Players.LocalPlayer.Character:FindFirstChildOfClass("Tool")
| |
| 1577 | tool.GripPos = Vector3.new(0, 0, 0) | |
| 1578 | end | |
| 1579 | ||
| 1580 | local FlyLoop | |
| 1581 | ||
| 1582 | game:GetService("UserInputService").InputBegan:Connect(function(input, gameProcessed)
| |
| 1583 | if not gameProcessed then | |
| 1584 | if input.UserInputType == Enum.UserInputType.Keyboard then | |
| 1585 | if input.KeyCode == Enum.KeyCode[Kingston.Misc.Fly.Keybind] then | |
| 1586 | Kingston.Misc.Fly.Enabled = not Kingston.Misc.Fly.Enabled | |
| 1587 | if Kingston.Misc.Fly.Enabled then | |
| 1588 | FlyLoop = game:GetService("RunService").Stepped:Connect(function()
| |
| 1589 | spawn(function() | |
| 1590 | pcall(function() | |
| 1591 | if Kingston.Misc.Fly.Enabled then | |
| 1592 | local speed = Kingston.Misc.Fly.Speed | |
| 1593 | local velocity = Kingston.Misc.Fly.Velocity | |
| 1594 | local UserInputService = game:GetService("UserInputService")
| |
| 1595 | ||
| 1596 | if UserInputService:IsKeyDown(Enum.KeyCode.W) then | |
| 1597 | velocity = velocity + (workspace.CurrentCamera.CoordinateFrame.lookVector * speed) | |
| 1598 | end | |
| 1599 | if UserInputService:IsKeyDown(Enum.KeyCode.A) then | |
| 1600 | velocity = velocity + (workspace.CurrentCamera.CoordinateFrame.rightVector * -speed) | |
| 1601 | end | |
| 1602 | if UserInputService:IsKeyDown(Enum.KeyCode.S) then | |
| 1603 | velocity = velocity + (workspace.CurrentCamera.CoordinateFrame.lookVector * -speed) | |
| 1604 | end | |
| 1605 | if UserInputService:IsKeyDown(Enum.KeyCode.D) then | |
| 1606 | velocity = velocity + (workspace.CurrentCamera.CoordinateFrame.rightVector * speed) | |
| 1607 | end | |
| 1608 | ||
| 1609 | game.Players.LocalPlayer.Character.HumanoidRootPart.Velocity = velocity | |
| 1610 | game.Players.LocalPlayer.Character.Humanoid:ChangeState("Freefall")
| |
| 1611 | end | |
| 1612 | end) | |
| 1613 | end) | |
| 1614 | end) | |
| 1615 | elseif FlyLoop then | |
| 1616 | FlyLoop:Disconnect() | |
| 1617 | game.Players.LocalPlayer.Character.Humanoid:ChangeState("Seated")
| |
| 1618 | end | |
| 1619 | end | |
| 1620 | end | |
| 1621 | end | |
| 1622 | end) | |
| 1623 | ScreenGui:Remove() | |
| 1624 | else | |
| 1625 | NotifyLib.prompt('Kingston', 'Incorrect Key', 2)
| |
| 1626 | end | |
| 1627 | end | |
| 1628 | ||
| 1629 | TextButton.MouseButton1Click:Connect(function() | |
| 1630 | local KeyEntered = TextBox.Text | |
| 1631 | loadScript(KeyEntered) | |
| 1632 | end) | |
| 1633 | end |