-- Compiled with roblox-ts v3.0.0 local TS = _G[script] local StandardAction = TS.import(script, script.Parent, "standard-action").StandardAction local getRawInput = TS.import(script, script.Parent, "common").getRawInput local CompositeAction do local super = StandardAction CompositeAction = setmetatable({}, { __tostring = function() return "CompositeAction" end, __index = super, }) CompositeAction.__index = CompositeAction function CompositeAction:constructor(...) super.constructor(self, ...) self.timing = 0 self.keyPressTimestamps = {} end function CompositeAction:handleInput(input, processed, isPress) if isPress == nil then isPress = input.UserInputState == Enum.UserInputState.Begin end if self.processed ~= processed then return nil end local rawInput = getRawInput(input) if isPress then local _keyPressTimestamps = self.keyPressTimestamps local _arg1 = os.clock() _keyPressTimestamps[rawInput] = _arg1 local i = 1 local _exp = self.rawInputs -- ▼ ReadonlyArray.every ▼ local _result = true local _callback = function(rawInput) local _keyPressTimestamps_1 = self.keyPressTimestamps local _rawInput = rawInput local _condition = _keyPressTimestamps_1[_rawInput] if _condition == nil then _condition = 0 end local pressTimestamp = _condition local _exp_1 = os.clock() local _exp_2 = self.timing local _original = i i += 1 local expectedPressTimestamp = _exp_1 - _exp_2 * _original local timeHeld = expectedPressTimestamp - pressTimestamp local _result_1 if self.timing > 0 then _result_1 = timeHeld < self.timing else local _keyPressTimestamps_2 = self.keyPressTimestamps local _rawInput_1 = rawInput _result_1 = _keyPressTimestamps_2[_rawInput_1] ~= nil end return _result_1 end for _k, _v in _exp do if not _callback(_v, _k - 1, _exp) then _result = false break end end -- ▲ ReadonlyArray.every ▲ local shouldHandleInput = _result if shouldHandleInput then super.handleInput(self, input, processed, isPress) end return nil else self.keyPressTimestamps[rawInput] = nil end if not self.isActive then return nil end super.handleInput(self, input, processed, isPress) end end local CompositeActionBuilder do local super = CompositeAction CompositeActionBuilder = setmetatable({}, { __tostring = function() return "CompositeActionBuilder" end, __index = super, }) CompositeActionBuilder.__index = CompositeActionBuilder function CompositeActionBuilder.new(...) local self = setmetatable({}, CompositeActionBuilder) return self:constructor(...) or self end function CompositeActionBuilder:constructor(...) super.constructor(self, ...) end function CompositeActionBuilder:setID(id) self.id = id return self end function CompositeActionBuilder:setProcessed(processed) self.processed = processed return self end function CompositeActionBuilder:setCooldown(cooldown) self.cooldown = cooldown return self end function CompositeActionBuilder:setTiming(timing) self.timing = timing return self end end return { CompositeAction = CompositeAction, CompositeActionBuilder = CompositeActionBuilder, }