Skip to content

Instantly share code, notes, and snippets.

@DinosaurXxX
Created February 25, 2020 05:52
Show Gist options
  • Save DinosaurXxX/9fe3685e886a00a219e35661ba99f2d2 to your computer and use it in GitHub Desktop.
Save DinosaurXxX/9fe3685e886a00a219e35661ba99f2d2 to your computer and use it in GitHub Desktop.
--Game: https://www.roblox.com/games/3775649046/NEW-K-O-Simulator
local HoldKey = "F"
local ToggleKey = "G"
local WT = .08 --Acts as speed
local CAS = game:GetService("ContextActionService")
CAS:UnbindAction("Fight")
local store = game.ReplicatedStorage
local plr = game.Players.LocalPlayer
local max = plr["DataFolder"]["StrengthStorage"]
local cur = plr["DataFolder"]["Strength"]
local sold = false
local Hold = false
local Toggle = false
function code() end
function main(action, state, obj)
if state == Enum.UserInputState.Begin and obj.KeyCode == Enum.KeyCode[ToggleKey] then
if Toggle then
Toggle = false
else
Toggle = true
while Toggle do
code()
end
end
end
if state == Enum.UserInputState.Begin and obj.KeyCode == Enum.KeyCode[HoldKey] then
Hold = true
while Hold do
code()
end
elseif state == Enum.UserInputState.End and obj.KeyCode == Enum.KeyCode[HoldKey] then
Hold = false
end
end
function code()
for i = 1,2 do
store.Events.PunchCombo:FireServer(i)
end
wait(WT)
if cur.Value >= max.Value / 1.5 then
local root = plr.Character:FindFirstChild("HumanoidRootPart")
if root and not sold then
coroutine.resume(coroutine.create(function()
sold = true
local p = game:GetService("Workspace")["Lobby"]["Sell"]
local temp = p.Position
p.Position = root.Position + Vector3.new(0,-4.3,0)
wait(.1)
p.Position = temp
wait(1)
sold = false
end))
end
end
end
CAS:BindAction("Fight", main, false, Enum.KeyCode[HoldKey],Enum.KeyCode[ToggleKey])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment