1
0
Fork 0

LAST STAND

This commit is contained in:
Akira Olivia Pink 2025-08-22 11:32:37 -03:00
parent 27f06f2ba7
commit 4d30d62f47
42 changed files with 140936 additions and 3168 deletions

View file

@ -0,0 +1,700 @@
-- V1.14 for 0.1.0 and above
-- Made by JimmyHelp
-- Contains Manuel's runLater
local anims = {}
local controller = {}
local controllerMT = {__index = controller}
local objects = {}
local exList = {
"idling",
"walking",
"walkingback",
"jumpingup",
"jumpingdown",
"falling",
"sprinting",
"sprintjumpup",
"sprintjumpdown",
"crouching",
"crouchwalk",
"crouchwalkback",
"crouchjumpup",
"crouchjumpdown",
"elytra",
"elytradown",
"trident",
"sleeping",
"swimming",
"sitting",
"sitmove",
"sitmoveback",
"sitjumpup",
"sitjumpdown",
"sitpass",
"crawling",
"crawlstill",
"flying",
"flywalk",
"flywalkback",
"flysprint",
"flyup",
"flydown",
"climbing",
"climbstill",
"climbdown",
"climbcrouch",
"climbcrouchwalking",
"water",
"waterwalk",
"waterwalkback",
"waterup",
"waterdown",
"watercrouch",
"watercrouchwalk",
"watercrouchwalkback",
"watercrouchup",
"watercrouchdown",
"hurt",
"death"
}
local incList = {
"attackR",
"attackL",
"mineR",
"mineL",
"holdR",
"holdL",
"eatR",
"eatL",
"drinkR",
"drinkL",
"blockR",
"blockL",
"bowR",
"bowL",
"loadR",
"loadL",
"crossR",
"crossL",
"spearR",
"spearL",
"spyglassR",
"spyglassL",
"hornR",
"hornL",
"brushR",
"brushL",
}
--[[local oldList = {} -- simply make the list again
for key, _ in pairs(aList) do
oldList[key] = {active = false}
end]]
local GSAnimBlend
for _, key in ipairs(listFiles(nil,true)) do
if key:find("GSAnimBlend$") then
GSAnimBlend = require(key)
break
end
end
if GSAnimBlend then GSAnimBlend.safe = false end
local function setBlendTime(ex,inc,o)
for _,list in pairs(o.aList) do
for _,value in pairs(list.list) do
value:setBlendTime(list.type == "excluAnims" and ex or inc)
end
end
end
---@param ex? number
---@param inc? number
function controller:setBlendTimes(ex,inc)
if not GSAnimBlend then error("GSAnimBlend was not found in the avatar, and this function is for interacting with GSAnimBlend.",2) end
if type(ex) ~= "number" and ex ~= nil then
error("The first arg is a non-number value ("..type(ex).."), must be a number or nil.",2)
end
if type(inc) ~= "number" and inc ~= nil then
error("The second arg is a non-number value ("..type(inc).."), must be a number or nil.",2)
end
if ex == nil then
ex = 0
end
if inc == nil then
inc = ex
end
setBlendTime(ex,inc,self)
return self
end
local flyinit
local function addAnims(bb,o)
local listy = o.aList
for _,anim in pairs(bb) do
for name,animation in pairs(anim) do
if name:find("fly") then flyinit = true end
for key, _ in pairs(o.aList) do
if name:find(key.."$") then
listy[key].list[#listy[key].list+1] = animation
break
end
end
end
end
if GSAnimBlend then setBlendTime(4,4,o) end
end
---@param anim table
---@param ifFly? boolean
function controller:setAnims(anim,ifFly)
flyinit = ifFly
for key, value in pairs(anim) do
self.aList[key].list = value
end
if GSAnimBlend then setBlendTime(4,4,self) end
return self
end
---- Run Later by manuel_2867 ----
local tmrs={}
local t=0
---Schedules a function to run after a certain amount of ticks
---@param ticks number|function Amount of ticks to wait, or a predicate function to check each tick until it returns true
---@param next function Function to run after amount of ticks, or after the predicate function returned true
local function wait(ticks,next)
local x=type(ticks)=="number"
table.insert(tmrs,{t=x and t+ticks,p=x and function()end or ticks,n=next})
end
function events.TICK()
t=t+1
for key,timer in pairs(tmrs) do
if timer.p()or(timer.t and t >= timer.t)then
timer.n()
tmrs[key]=nil
end
end
end
local fallVel = -0.6
---@param vel? number
function anims:setFallVel(vel)
if type(vel) ~= "number" and vel ~= nil then
error("Tried to set the velocity to a non-number value ("..type(vel)..").")
end
fallVel = vel or -0.6
return self
end
local oneJump = false
---@param state? boolean
function anims:setOneJump(state)
oneJump = state or false
return self
end
local auto = true
function anims:disableAutoSearch()
auto = false
return self
end
local function getPlay(anim)
local exists, hold = pcall(anim.isHolding,anim)
return anim:isPlaying() or (exists and hold)
end
local function getOverriders(type,o)
return o.overrideStates[type] or o.overrideStates.allAnims
end
local function addOverriders(self,type,...)
for _, value in pairs({...}) do
if #self.overriders[type] == 64 then
error("The max amount of overriding animations for "..type.." (64) was reached. Do not put the code for adding overriding animations in a function, it will infinitely add animations.",3)
end
self.overriders[type][#self.overriders[type]+1] = value
end
end
---@param state? boolean
function controller:setAllOff(state)
self.setOverrides.allAnims = state
return self
end
---@param state? boolean
function controller:setExcluOff(state)
self.setOverrides.excluAnims = state
return self
end
---@param state? boolean
function controller:setIncluOff(state)
self.setOverrides.incluAnims = state
return self
end
---@param ... Animation
function controller:addExcluOverrider(...)
addOverriders(self,"excluAnims",...)
return self
end
---@param ... Animation
function controller:addIncluOverrider(...)
addOverriders(self,"incluAnims",...)
return self
end
---@param ... Animation
function controller:addAllOverrider(...)
addOverriders(self,"allAnims",...)
return self
end
---@param exState? string
---@param inState? string
function controller:setState(exState,inState)
if type(exState) ~= "string" and exState ~= nil then
error("The first arg is a non-string value ("..type(exState).."), must be a string or nil.",2)
end
if type(inState) ~= "string" and inState ~= nil then
error("The second arg is a non-string value ("..type(inState).."), must be a string or nil.",2)
end
self.toggleState = {excluAnims = exState or "",incluAnims = inState or exState or ""}
return self
end
function controller:getState()
return self.toggleState
end
local function getStates(type,o)
return o.toggleState[type]
end
---@param spec? string
function controller:getAnimationStates(spec)
if type(spec) ~= "string" and spec ~= nil then
error("The animation state is a non-string value ("..type(spec).."), must be a string or nil.",2)
end
local states = {}
for k,v in pairs(self.aList) do
states[k] = v.active
end
if spec then return self.aList[spec].active else return states end
end
local function setAnimation(anim,override,state,o)
local saved = o.aList[anim]
local exists = true
for _,value in pairs(saved.list) do
if value:getName() == state..anim then
if not saved.active and saved.stop then break end
value:setPlaying(saved.active and not override)
if saved.active and saved.stop and not override then
value:stop():play()
end
exists = false
else
if not saved.active and saved.stop then break end
value:stop()
end
end
for _,value in pairs(saved.list) do
if exists and value:getName() == anim then
if not saved.active and saved.stop then break end
if saved.active and saved.stop and not override then
value:stop():play()
break
end
value:setPlaying(saved.active and not override)
end
end
end
local flying
function pings.EZAnims_cFly(x)
flying = x
end
local diff = false
local rightResult, leftResult, targetEntity, rightMine, leftMine, rightAttack, leftAttack, oldhitBlock, targetBlock, blockSuccess, blockResult, hitBlock
local yvel, grounded, oldgrounded, hasJumped, cFlying, oldcFlying
local cooldown = false
local updateTimer = 0
local toggleDiff
local function getInfo()
if host:isHost() then
if flyinit then
cFlying = host:isFlying()
if cFlying ~= oldcFlying then
pings.EZAnims_cFly(cFlying)
end
oldcFlying = cFlying
updateTimer = updateTimer + 1
if updateTimer % 200 == 0 then
pings.EZAnims_cFly(cFlying)
end
end
end
local pose = player:getPose()
local velocity = player:getVelocity()
local moving = velocity.xz:length() > 0.01
local sprinty = player:isSprinting()
local vehicle = player:getVehicle()
local sitting = vehicle ~= nil or pose == "SITTING" -- if you're reading this code and see this, "SITTING" isn't a vanilla pose, this is for mods
local passenger = vehicle and vehicle:getControllingPassenger() ~= player
local creativeFlying = (flying or false) and not sitting
local standing = pose == "STANDING"
local crouching = pose == "CROUCHING" and not creativeFlying
local gliding = pose == "FALL_FLYING"
local spin = pose == "SPIN_ATTACK"
local sleeping = pose == "SLEEPING"
local swimming = pose == "SWIMMING"
local inWater = player:isUnderwater() and not sitting
local inLiquid = player:isInWater() or player:isInLava()
local liquidSwim = swimming and inLiquid
local crawling = swimming and not inLiquid
-- hasJumped stuff
yvel = velocity.y
local hover = yvel < .01 and yvel > -.01
local goingUp = yvel > .01
local goingDown = yvel < -.01
local falling = yvel < fallVel
local playerGround = world.getBlockState(player:getPos():add(0,-.1,0))
local vehicleGround = sitting and world.getBlockState(vehicle:getPos():add(0,-.1,0))
oldgrounded = grounded
grounded = playerGround:isSolidBlock() or player:isOnGround() or (sitting and vehicleGround:isSolidBlock() or sitting and vehicle:isOnGround())
local pv = velocity:mul(1, 0, 1):normalize()
local pl = models:partToWorldMatrix():applyDir(0,0,-1):mul(1, 0, 1):normalize()
local fwd = pv:dot(pl)
local backwards = fwd < -.8
--local sideways = pv:cross(pl)
--local right = sideways.y > .6
--local left = sideways.y < -.6
-- canJump stuff
local webbed = world.getBlockState(player:getPos()).id == "minecraft:cobweb"
local ladder = player:isClimbing() and not grounded and not flying
local canJump = not (inLiquid or webbed or grounded)
local hp = player:getHealth() + player:getAbsorptionAmount()
if oldgrounded ~= grounded and not grounded and yvel > 0 then
cooldown = true
wait(10,function() cooldown = false end)
end
if (oldgrounded ~= grounded and not grounded and yvel > 0) and canJump then hasJumped = true end
if (grounded and (yvel <= 0 and yvel > -0.1)) or (gliding or inLiquid) then hasJumped = false end
local neverJump = not (gliding or spin or sleeping or swimming or ladder)
local jumpingUp = hasJumped and goingUp and neverJump
local jumpingDown = hasJumped and goingDown and not falling and neverJump or (cooldown and not jumpingUp)
local isJumping = jumpingUp or jumpingDown or falling
local sprinting = sprinty and standing and not inLiquid and not sitting
local walking = moving and not sprinting and not isJumping and not sitting
local forward = walking and not backwards
local backward = walking and backwards
local handedness = player:isLeftHanded()
local rightItem = player:getHeldItem(handedness)
local leftItem = player:getHeldItem(not handedness)
local rightActive = handedness and "OFF_HAND" or "MAIN_HAND"
local leftActive = not handedness and "OFF_HAND" or "MAIN_HAND"
local activeness = player:getActiveHand()
local using = player:isUsingItem()
local rightSuccess = pcall(rightItem.getUseAction,rightItem)
if rightSuccess then rightResult = rightItem:getUseAction() else rightResult = "NONE" end
local usingR = using and activeness == rightActive and rightResult
local leftSuccess = pcall(leftItem.getUseAction,leftItem)
if leftSuccess then leftResult = leftItem:getUseAction() else leftResult = "NONE" end
local usingL = using and activeness == leftActive and leftResult
local swing = player:getSwingTime()
local arm = swing == 1 and not sleeping and player:getSwingArm()
local rTag= rightItem.tag
local lTag = leftItem.tag
local crossR = rTag and (rTag["Charged"] == 1 or (rTag["ChargedProjectiles"] and next(rTag["ChargedProjectiles"])~= nil)) or false
local crossL = lTag and (lTag["Charged"] == 1 or (lTag["ChargedProjectiles"] and next(lTag["ChargedProjectiles"])~= nil)) or false
local exclude = not (crossR or crossL or using)
local game = player:getGamemode()
local reach = game and 6 or 3
if swing == 1 then
targetEntity = type(player:getTargetedEntity(reach)) == "PlayerAPI" or type(player:getTargetedEntity(reach)) == "LivingEntityAPI"
rightMine = oldhitBlock and not targetEntity
leftMine = oldhitBlock and not targetEntity
rightAttack = (not oldhitBlock or targetEntity)
leftAttack = (not oldhitBlock or targetEntity)
end
for _,o in pairs(objects) do
o.diff = false
for types, tabs in pairs(o.overriders) do
o.overrideStates[types] = o.setOverrides[types] or false
for _, value in pairs(tabs) do
if getPlay(value) then
o.overrideStates[types] = true
break
end
end
if o.oldoverStates[types] ~= o.overrideStates[types] then
o.diff = true
end
o.oldoverStates[types] = o.overrideStates[types]
end
local ob = o.aList
ob.flywalkback.active = creativeFlying and backward and (not (goingDown or goingUp))
ob.flysprint.active = creativeFlying and sprinting and not isJumping and (not (goingDown or goingUp))
ob.flyup.active = creativeFlying and goingUp
ob.flydown.active = creativeFlying and goingDown
ob.flywalk.active = creativeFlying and forward and (not (goingDown or goingUp)) and not sleeping or (ob.flysprint.active and next(ob.flysprint.list)==nil) or (ob.flywalkback.active and next(ob.flywalkback.list)==nil)
or (ob.flyup.active and next(ob.flyup.list)==nil) or (ob.flydown.active and next(ob.flydown.list)==nil)
ob.flying.active = creativeFlying and not sprinting and not moving and standing and not isJumping and (not (goingDown or goingUp)) and not sleeping or (ob.flywalk.active and next(ob.flywalk.list)==nil)
ob.watercrouchwalkback.active = inWater and crouching and backward and not goingDown
ob.watercrouchwalk.active = inWater and crouching and forward and not (goingDown or goingUp) or (ob.watercrouchwalkback.active and next(ob.watercrouchwalkback.list)==nil)
ob.watercrouchup.active = inWater and crouching and goingUp
ob.watercrouchdown.active = inWater and crouching and goingDown or (ob.watercrouchup.active and next(ob.watercrouchup.list)==nil)
ob.watercrouch.active = inWater and crouching and not moving and not (goingDown or goingUp) or (ob.watercrouchdown.active and next(ob.watercrouchdown.list)==nil) or (ob.watercrouchwalk.active and next(ob.watercrouchwalk.list)==nil)
ob.waterdown.active = inWater and goingDown and not falling and standing and not creativeFlying
ob.waterup.active = inWater and goingUp and standing and not creativeFlying
ob.waterwalkback.active = inWater and backward and hover and standing and not creativeFlying
ob.waterwalk.active = inWater and forward and hover and standing and not creativeFlying or (ob.waterwalkback.active and next(ob.waterwalkback.list)==nil) or (ob.waterdown.active and next(ob.waterdown.list)==nil)
or (ob.waterup.active and next(ob.waterup.list)==nil)
ob.water.active = inWater and not moving and standing and hover and not creativeFlying or (ob.waterwalk.active and next(ob.waterwalk.list)==nil)
ob.crawlstill.active = crawling and not moving
ob.crawling.active = crawling and moving or (ob.crawlstill.active and next(ob.crawlstill.list)==nil)
ob.swimming.active = liquidSwim or (ob.crawling.active and next(ob.crawling.list)==nil)
ob.elytradown.active = gliding and goingDown
ob.elytra.active = gliding and not goingDown or (ob.elytradown.active and next(ob.elytradown.list)==nil)
ob.sitpass.active = passenger and standing or false
ob.sitjumpdown.active = sitting and not passenger and standing and (jumpingDown or falling)
ob.sitjumpup.active = sitting and not passenger and jumpingUp and standing or (ob.sitjumpdown.active and next(ob.sitjumpdown.list)==nil)
ob.sitmoveback.active = sitting and not passenger and not isJumping and backwards and standing
ob.sitmove.active = velocity:length() > 0 and not passenger and not backwards and standing and sitting and not isJumping or (ob.sitmoveback.active and next(ob.sitmoveback.list)==nil) or (ob.sitjumpup.active and next(ob.sitjumpup.list)==nil)
ob.sitting.active = sitting and not passenger and velocity:length() == 0 and not isJumping and standing or (ob.sitmove.active and next(ob.sitmove.list)==nil) or (ob.sitpass.active and next(ob.sitpass.list)==nil) or false
ob.trident.active = spin
ob.sleeping.active = sleeping
ob.climbcrouchwalking.active = ladder and crouching and not inWater and (moving or yvel ~= 0)
ob.climbcrouch.active = ladder and crouching and hover and not moving or (ob.climbcrouchwalking.active and next(ob.climbcrouchwalking.list)==nil)
ob.climbdown.active = ladder and goingDown and not crouching
ob.climbstill.active = ladder and not crouching and hover
ob.climbing.active = ladder and goingUp and not crouching or (ob.climbdown.active and next(ob.climbdown.list)==nil) or (ob.climbstill.active and next(ob.climbstill.list)==nil)
ob.crouchjumpdown.active = crouching and jumpingDown and not inWater and not ladder
ob.crouchjumpup.active = crouching and jumpingUp and not inWater and not ladder or (not oneJump and (ob.crouchjumpdown.active and next(ob.crouchjumpdown.list)==nil))
ob.crouchwalkback.active = backward and crouching and not inWater and not ladder or (ob.watercrouchwalkback.active and next(ob.watercrouchwalkback.list)==nil and next(ob.watercrouchwalk.list)==nil and next(ob.watercrouch.list)==nil)
ob.crouchwalk.active = forward and crouching and not (jumpingDown or jumpingUp) and not inWater and not ladder or (ob.crouchwalkback.active and next(ob.crouchwalkback.list)==nil) or (not oneJump and (ob.crouchjumpup.active and next(ob.crouchjumpup.list)==nil)) or ((ob.watercrouchwalk.active and not ob.watercrouchwalkback.active) and next(ob.watercrouchwalk.list)==nil and next(ob.watercrouch.list)==nil)
ob.crouching.active = crouching and not walking and not inWater and not isJumping and not ladder and not cooldown or (ob.crouchwalk.active and next(ob.crouchwalk.list)==nil) or (ob.climbcrouch.active and next(ob.climbcrouch.list)==nil) or ((ob.watercrouch.active and not ob.watercrouchwalk.active) and next(ob.watercrouch.list)==nil)
ob.falling.active = falling and not gliding and not creativeFlying and not sitting
ob.sprintjumpdown.active = jumpingDown and sprinting and not creativeFlying and not ladder or false
ob.sprintjumpup.active = jumpingUp and sprinting and not creativeFlying and not ladder or (not oneJump and (ob.sprintjumpdown.active and next(ob.sprintjumpdown.list)==nil)) or false
ob.jumpingdown.active = jumpingDown and not ladder and not sprinting and not crouching and not sitting and not sleeping and not gliding and not creativeFlying and not spin and not inWater or (ob.falling.active and next(ob.falling.list)==nil) or (oneJump and (ob.sprintjumpdown.active and next(ob.sprintjumpdown.list)==nil)) or (oneJump and (ob.crouchjumpdown.active and next(ob.crouchjumpdown.list)==nil))
ob.jumpingup.active = jumpingUp and not ladder and not sprinting and not crouching and not sitting and not creativeFlying and not inWater or (ob.jumpingdown.active and next(ob.jumpingdown.list)==nil) or (ob.trident.active and next(ob.trident.list)==nil) or (oneJump and (ob.sprintjumpup.active and next(ob.sprintjumpup.list)==nil)) or (oneJump and (ob.crouchjumpup.active and next(ob.crouchjumpup.list)==nil))
ob.sprinting.active = sprinting and not isJumping and not creativeFlying and not ladder and not cooldown and not inWater or (not oneJump and (ob.sprintjumpup.active and next(ob.sprintjumpup.list)==nil)) or false
ob.walkingback.active = backward and standing and not creativeFlying and not ladder and not inWater or (ob.flywalkback.active and next(ob.flywalkback.list)==nil and next(ob.flywalk.list)==nil and next(ob.flying.list)==nil)
ob.walking.active = forward and standing and not creativeFlying and not ladder and not cooldown and not inWater or (ob.walkingback.active and next(ob.walkingback.list)==nil) or (ob.sprinting.active and next(ob.sprinting.list)==nil) or (ob.climbing.active and next(ob.climbing.list)==nil)
or (ob.swimming.active and next(ob.swimming.list)==nil) or (ob.elytra.active and next(ob.elytra.list)==nil) or (ob.jumpingup.active and next(ob.jumpingup.list)==nil) or (ob.waterwalk.active and (next(ob.waterwalk.list)==nil and next(ob.water.list)==nil)) or ((ob.flywalk.active and not ob.flywalkback.active) and next(ob.flywalk.list)==nil and next(ob.flying.list)==nil)
or (ob.crouchwalk.active and (next(ob.crouchwalk)==nil or next(ob.crouching.list)==nil))
ob.idling.active = not moving and not sprinting and standing and not isJumping and not sitting and not inWater and not creativeFlying and not ladder or (ob.sleeping.active and next(ob.sleeping.list)==nil) or (ob.sitting.active and next(ob.sitting.list)==nil)
or ((ob.water.active and not ob.waterwalk.active) and next(ob.water.list)==nil) or ((ob.flying.active and not ob.flywalk.active) and next(ob.flying.list)==nil) or ((ob.crouching.active and not ob.crouchwalk.active) and next(ob.crouching.list)==nil)
ob.death.active = hp <= 0
ob.hurt.active = player:getNbt().HurtTime > 0 and hp > 0
ob.attackR.active = arm == rightActive and rightAttack
ob.attackL.active = arm == leftActive and leftAttack
ob.mineR.active = arm == rightActive and rightMine
ob.mineL.active = arm == leftActive and leftMine
ob.holdR.active = rightItem.id~="minecraft:air" and exclude
ob.holdL.active = leftItem.id~="minecraft:air" and exclude
ob.eatR.active = usingR == "EAT"
ob.eatL.active = usingL == "EAT"
ob.drinkR.active = usingR == "DRINK"
ob.drinkL.active = usingL == "DRINK"
ob.blockR.active = usingR == "BLOCK"
ob.blockL.active = usingL == "BLOCK"
ob.bowR.active = usingR == "BOW"
ob.bowL.active = usingL == "BOW"
ob.loadR.active = usingR == "CROSSBOW"
ob.loadL.active = usingL == "CROSSBOW"
ob.crossR.active = crossR
ob.crossL.active = crossL
ob.spearR.active = usingR == "SPEAR"
ob.spearL.active = usingL == "SPEAR"
ob.spyglassR.active = usingR == "SPYGLASS"
ob.spyglassL.active = usingL == "SPYGLASS"
ob.hornR.active = usingR == "TOOT_HORN"
ob.hornL.active = usingL == "TOOT_HORN"
ob.brushR.active = usingR == "BRUSH"
ob.brushL.active = usingL == "BRUSH"
for key,value in pairs(o.aList) do
if (value.active ~= o.oldList[key].active) then
setAnimation(key,getOverriders(value.type,o),getStates(value.type,o),o)
end
if (o.toggleDiff or o.diff) and value.active then
setAnimation(key,getOverriders(value.type,o),getStates(value.type,o),o)
end
o.oldList[key].active = value.active
end
o.toggleDiff = false
for key,_ in pairs(o.toggleState) do
if o.oldToggle[key] ~= o.toggleState[key] then
o.toggleDiff = true
end
o.oldToggle[key] = o.toggleState[key]
end
end
oldhitBlock = hitBlock
targetBlock = player:getTargetedBlock(true, game and 5 or 4.5)
blockSuccess, blockResult = pcall(targetBlock.getTextures, targetBlock)
if blockSuccess then hitBlock = not (next(blockResult) == nil) else hitBlock = true end
end
function events.tick()
getInfo()
end
local function getBBModels()
local bbmodels = {}
for _,layer in pairs(models:getChildren()) do
local name = layer:getName()
if animations[name] then
bbmodels[name] = animations[name]
else
for _,layer2 in pairs(layer:getChildren()) do
local name2 = name.."."..layer2:getName()
bbmodels[name2] = animations[name2]
end
end
end
if next(bbmodels) == nil then
error("No blockbench models containing animations were found.")
end
local aList = {}
local oldList = {}
for _, value in pairs(exList) do
aList[value] = {active = false,list = {},type = "excluAnims"}
oldList[value] = {active = false}
end
for _, value in pairs(incList) do
aList[value] = {active = false,list = {},type = "incluAnims"}
oldList[value] = {active = false}
end
aList.attackR.stop = true
aList.attackL.stop = true
aList.mineR.stop = true
aList.mineL.stop = true
aList.hurt.stop = true
local o = setmetatable(
{
bbmodels=bbmodels,
aList=aList,
oldList=oldList,
toggleState = {excluAnims="",incluAnims=""},
oldToggle = {excluAnims="",incluAnims=""},
toggleDiff = toggleDiff,
overriders = {excluAnims = {},incluAnims = {}, allAnims = {}},
overrideStates = {excluAnims = false,incluAnims = false, allAnims = false},
oldoverStates = {excluAnims = false,incluAnims = false, allAnims = false},
setOverrides = {excluAnims = false,incluAnims = false, allAnims = false},
diff = diff
},
controllerMT)
objects[1] = o
addAnims(bbmodels,o)
end
function events.entity_init()
if #objects == 0 then getBBModels() end
end
local firstRun = true
---@param ... table
function anims:addBBModel(...)
local bbmodels = {...}
if next(bbmodels) == nil then
error("The blockbench model provided couldn't be found because it has no animations, or because of a typo or some other mistake.",2)
end
local aList = {}
local oldList = {}
for _, value in pairs(exList) do
aList[value] = {active = false,list = {},type = "excluAnims"}
oldList[value] = {active = false}
end
for _, value in pairs(incList) do
aList[value] = {active = false,list = {},type = "incluAnims"}
oldList[value] = {active = false}
end
aList.attackR.stop = true
aList.attackL.stop = true
aList.mineR.stop = true
aList.mineL.stop = true
aList.hurt.stop = true
local o = setmetatable(
{
bbmodels=bbmodels,
aList=aList,
oldList=oldList,
toggleState = {excluAnims="",incluAnims=""},
oldToggle = {excluAnims="",incluAnims=""},
toggleDiff = toggleDiff,
overriders = {excluAnims = {},incluAnims = {}, allAnims = {}},
overrideStates = {excluAnims = false,incluAnims = false, allAnims = false},
oldoverStates = {excluAnims = false,incluAnims = false, allAnims = false},
setOverrides = {excluAnims = false,incluAnims = false, allAnims = false},
diff = diff
},
controllerMT)
objects[#objects+1] = o
if #objects == 16 then
error("The max amount of blockbench models (16) was reached. Do not put the code for adding blockbench models in a function, it will infinitely add blockbench models.",3)
end
if auto then addAnims(bbmodels,o) end
return o
end
anims.controller = controller
return anims

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,58 @@
--EMOTES--
local mainPage = action_wheel:newPage()
action_wheel:setPage(mainPage)
function pings.Follow()
animations.akira_olivia_pink.followMe:play()
end
---
function pings.Wave()
animations.akira_olivia_pink.wave:play()
end
---
function pings.Clap()
animations.akira_olivia_pink.clap:play()
end
---
-- function pings.Gun(state)
-- animations.akira_olivia_pink.ready_gun:setPlaying(state)
-- end
---
function pings.Sitting(state)
animations.akira_olivia_pink.sit_emote:setPlaying(state)
end
---
--------------------------------------------------------------------
mainPage:newAction()
:title("Wave")
:item("minecraft:lantern")
:hoverColor(1,1,0)
:onLeftClick(pings.Wave)
mainPage:newAction()
:title("Follow Me")
:item("minecraft:compass")
:hoverColor(1,1,0)
:onLeftClick(pings.Follow)
mainPage:newAction()
:title("Clap")
:item("minecraft:rabbit_foot")
:hoverColor(1,1,0)
:onLeftClick(pings.Clap)
mainPage:newAction()
:title("Sit")
:item("minecraft:purpur_stairs")
:hoverColor(1,1,0)
:onToggle(pings.Sitting)
-- mainPage:newAction()
-- :title("Gun")
-- :item("minecraft:crossbow")
-- :hoverColor(1,1,0)
-- :onToggle(pings.Gun)

View file

@ -0,0 +1,9 @@
{
"authors": [
"oatmealine",
"akirapink"
],
"name": "Akira Olivia Pink (v2)",
"description":"The Human (Eek!)",
"color": "#ff73d3"
}

View file

@ -0,0 +1,8 @@
{
"authors": [
"oatmealine",
"akirapink"
],
"name": "Akira Olivia Pink",
"description":"§e§lINHERITED CONTEXT::"
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

View file

@ -0,0 +1,29 @@
require("GSAnimBlend")
local anims = require("EZAnims")
local example = anims:addBBModel(animations.akira_olivia_pink)
vanilla_model.PLAYER:setVisible(false)
vanilla_model.ARMOR:setVisible(false)
vanilla_model.HELD_ITEMS:setVisible(true)
vanilla_model.ELYTRA:setVisible(true)
vanilla_model.CAPE:setVisible(false)
BlendTime = 2
animations.akira_olivia_pink.sit_emote:setBlendTime(2)
-- nameplate.All:setText('[{"text":"akirapink","color":"#ff73d3"}]')
-- models.akira_olivia_pink.root.RightArm
-- :copy("RightArmCopy") -- Create a copy of the arm
-- :setParentType("models.akira_olivia_pink.root.Torso.RightArm") -- Set the parent type of the copy
-- :moveTo(models.akira_olivia_pink.root.Torso) -- Move it to some location in the model
--
--function events.RENDER(_, context)
-- local is_firstperson = context == "FIRST_PERSON"f
-- models.akira_olivia_pink.root.Torso.RightArm:setVisible(not is_firstperson)
-- models.akira_olivia_pink.root.Torso:setVisible(not is_firstperson)
-- models.akira_olivia_pink.root.Torso.backpack:setVisible(not is_firstperson)
-- models.akira_olivia_pink.root.Torso.RightArmCopy:setVisible(is_firstperson)
--end
--hide vanilla elytra model
vanilla_model.ELYTRA:setVisible(false)

View file

@ -1,155 +0,0 @@
local IMMUNITIES = {
Movement = false,
Charter = false
}
--- @class MovementAPI
local movement = {}
--- @class CharterIntegration
local CharterIntegration = {}
local page = {
immunities = IMMUNITIES,
movement = function (state, self)
IMMUNITIES.Movement = state
host:actionbar("§fMovement Immunity: " .. tostring(IMMUNITIES.Movement))
end,
charter = function (state, self)
IMMUNITIES.Charter = state
host:actionbar("§6Charter Immunity: " .. tostring(IMMUNITIES.Charter))
end
}
---Divine Dominance's clamping of position. Creates the "stuck in the field" effect.
---@param c1 Vector3
---@param c2 Vector3
---@return boolean; return false to symbolize that you don't want this to happen. Any CI-compliant avatar will cancel upon returning false.
function CharterIntegration:DD_ClampPos(c1, c2)
if IMMUNITIES.Charter or not player:isLoaded() then return false end
local p = player:getPos()
local newVec = vec(
math.clamp(p.x, c1.x, c2.x),
math.clamp(p.y, c1.y, c2.y),
math.clamp(p.z, c1.z, c2.z)
)
if newVec ~= p then
c1 = c1 + 0.01
c2 = c2 - 0.01
newVec = vec(
math.clamp(p.x, c1.x, c2.x),
math.clamp(p.y, c1.y+0.1, c2.y),
math.clamp(p.z, c1.z, c2.z)
)
movement.SetPos(newVec)
if p.y ~= newVec.y then
movement.AddVelocity(0,0.1,0)
end
end
return true
end
---Function that is called when the player is caught in the Divine Dominance's area of effect.
---@param attacker string
---@return boolean; return false to symbolize that you don't want this to happen. Any CI-compliant avatar will cancel upon returning false.
function CharterIntegration:DD_Collapse(attacker)
if IMMUNITIES.Charter or not player:isLoaded() then return false end
movement.AddVelocity(0,60,0)
return true
end
---Function that is called when the player is hit by the Lesser Divinity
---@param attacker string
---@return boolean?; return false to symbolize that you don't want this to happen. Any CI-compliant avatar will cancel upon returning false.
function CharterIntegration:LD_Hit(attacker)
if IMMUNITIES.Charter or not player:isLoaded() then return end
movement.AddVelocity(0,60,0)
return true
end
---Function that is called when the player is hit by the Broken Lesser Divinity
---@param attacker string
---@return boolean?; return false to symbolize that you don't want this to happen. Any CI-compliant avatar will cancel upon returning false.
function CharterIntegration:BLD_Hit(attacker)
if IMMUNITIES.Charter or not player:isLoaded() then return end
movement.AddVelocity(-30 ,30,0)
return true
end
---Adds velocity to the player.
---@param x integer | Vector3
---@param y integer?
---@param z integer?
function movement.AddVelocity(x, y, z)
if IMMUNITIES.Movement or not player:isLoaded() then return end
local velocity
if type(x) == "number" then
velocity = vec(x,y--[[@as number]],z--[[@as number]])
else
velocity = x
end
if host:isHost() and goofy then
goofy:setVelocity((getActualPlayerVelocity() + velocity):clampLength(-60, 60)--[[@as Vector3]])
end
end
---Adds velocity to the player.
---@param x integer | Vector3
---@param y integer?
---@param z integer?
function movement.SetVelocity(x, y, z)
if IMMUNITIES.Movement or not player:isLoaded() then return end
local velocity
if type(x) == "number" then
velocity = vec(x,y--[[@as number]],z--[[@as number]])
else
velocity = x
end
if host:isHost() and goofy then
goofy:setVelocity(velocity:clampLength(-60, 60))
end
end
--- Sets the position of the player.
---@param x integer | Vector3
---@param y integer?
---@param z integer?
function movement.SetPos(x, y, z)
if IMMUNITIES.Movement or not player:isLoaded() then return end
local pos
if type(x) == "number" then
pos = vec(x,y--[[@as number]],z--[[@as number]])
else
pos = x
end
if host:isHost() and goofy then
goofy:setPos(pos)
end
end
--- Sets the position of the player.
---@param x integer | Vector3
---@param y integer?
---@param z integer?
function movement.ThrowToPos(x, y, z)
if IMMUNITIES.Movement or not player:isLoaded() then return end
local pos
if type(x) == "number" then
pos = vec(x,y--[[@as number]],z--[[@as number]])
else
pos = x
end
if host:isHost() and goofy then
goofy:setVelocity((pos - player:getPos()):clampLength(-60, 60))
end
end
function getActualPlayerVelocity()
return vec(table.unpack(player:getNbt().Motion))
end
avatar:store("MovementAPI", movement)
avatar:store("CharterIntegration", CharterIntegration)
return page

View file

@ -1,181 +0,0 @@
-- V3
local items = {}
local function getItem(item,itemid)
return item.id:find(itemid) or item:getName():find(itemid)
end
local function isPlaying(equip,unequip)
return (equip and equip:isPlaying()) or (unequip and unequip:isPlaying())
end
local complexList = {}
function events.render(_,ctx)
vanilla_model.RIGHT_ITEM:setVisible(true)
vanilla_model.RIGHT_ITEM:setVisible(true)
for _, value in pairs(complexList) do
if value.right then
vanilla_model.RIGHT_ITEM:setVisible(ctx == "FIRST_PERSON" or false)
end
if value.left then
vanilla_model.LEFT_ITEM:setVisible(ctx == "FIRST_PERSON" or false)
end
end
end
---@param itemtype string
---@param extrapart? ModelPart | table
---@param firstpart ModelPart
---@param thirdpartright ModelPart | table
---@param thirdpartleft ModelPart | table
---@param rightequip? Animation
---@param rightunequip? Animation
---@param leftequip? Animation
---@param leftunequip? Animation
---@param rightholding? Animation
---@param leftholding? Animation
function items:complexReplace(itemtype,extrapart,firstpart,thirdpartright,thirdpartleft,rightequip,rightunequip,leftequip,leftunequip,rightholding,leftholding)
if type(itemtype) ~= "string" then
error("Provided item to replace is not a string",2)
end
if type(firstpart) ~= "ModelPart" then
error("Provided first person part isn't a modelpart",2)
end
if type(thirdpartright) ~= "ModelPart" and type(thirdpartright) ~= "table" then
error("Provided third person right hand part isn't a modelpart or a table",2)
end
if type(thirdpartleft) ~= "ModelPart" and type(thirdpartleft) ~= "table" then
error("Provided third person left hand part isn't a modelpartor a table",2)
end
complexList[itemtype] = {}
if rightequip then rightequip:setLoop("ONCE") end
if rightunequip then rightunequip:setLoop("ONCE") end
if leftequip then leftequip:setLoop("ONCE") end
if leftunequip then leftunequip:setLoop("ONCE") end
local expart = type(extrapart) == "table" and extrapart or {extrapart}
local rpart = type(thirdpartright) == "table" and thirdpartright or {thirdpartright}
local lpart = type(thirdpartleft) == "table" and thirdpartleft or {thirdpartleft}
firstpart:setParentType("Item")
events.item_render:remove(itemtype.."Complex")
events.item_render:register(
function(item,mode)
if getItem(item,itemtype) and mode:find("FIRST") then
return firstpart
end
end,
itemtype.."Complex")
local oldrighthold
local oldlefthold
events.entity_init:remove(itemtype.."Complex")
events.entity_init:register(
function()
local lefty = player:isLeftHanded()
oldrighthold = getItem(player:getHeldItem(lefty),itemtype)
oldlefthold = getItem(player:getHeldItem(not lefty),itemtype)
end,
itemtype.."Complex")
events.render:remove(itemtype.."Complex")
events.render:register(
function(delta,context)
local lefty = player:isLeftHanded()
local righthold = getItem(player:getHeldItem(lefty),itemtype)
local lefthold = getItem(player:getHeldItem(not lefty),itemtype)
complexList[itemtype].right = righthold or false
complexList[itemtype].left = lefthold or false
local rightequipping = isPlaying(rightequip,rightunequip)
local leftequipping = isPlaying(leftequip,leftunequip)
for _,ex in pairs(expart) do
ex:setVisible((not (righthold or lefthold)) or rightequipping or leftequipping)
end
for _, right in pairs(rpart) do
right:setVisible(righthold or rightequipping and context~="FIRST_PERSON")
end
for _,left in pairs(lpart) do
left:setVisible(lefthold or leftequipping and context~="FIRST_PERSON")
end
if rightholding then
rightholding:setPlaying(righthold and not rightequipping)
end
if leftholding then
leftholding:setPlaying(lefthold and not leftequipping)
end
local newrighthold = righthold
if oldrighthold ~= newrighthold then
for _, right in pairs(rpart) do
right:setVisible(oldrighthold)
end
for _,ex in pairs(expart) do
ex:setVisible(newrighthold)
end
if rightequip then rightequip:setPlaying(newrighthold) end
if rightunequip then rightunequip:setPlaying(oldrighthold) end
end
oldrighthold = newrighthold
local newlefthold = lefthold
if oldlefthold ~= newlefthold then
for _,left in pairs(lpart) do
left:setVisible(oldlefthold)
end
for _,ex in pairs(expart) do
ex:setVisible(newlefthold)
end
if leftequip then leftequip:setPlaying(newlefthold) end
if leftunequip then leftunequip:setPlaying(oldlefthold) end
end
oldlefthold = newlefthold
end,
itemtype.."Complex")
return self
end
---@param itemtype string
---@param newparts ModelPart
---@param extrapart? ModelPart | table
---@param righthold? Animation
---@param lefthold? Animation
function items:simpleReplace(itemtype,newparts,extrapart,righthold,lefthold)
if type(itemtype) ~= "string" then
error("Provided item to replace is not a string",2)
end
if newparts then newparts:setParentType("Item") end
events.item_render:remove(itemtype.."Simple")
events.item_render:register(
function(item)
if getItem(item,itemtype) then
return newparts
end
end,
itemtype.."Simple")
if not (extrapart or righthold or lefthold) then return self end
local part = type(extrapart) == "table" and extrapart or {extrapart}
events.tick:remove(itemtype.."Simple")
events.tick:register(
function()
local lefty = player:isLeftHanded()
local rightI = player:getHeldItem(lefty)
local leftI = player:getHeldItem(not lefty)
for _, value in pairs(part) do
value:setVisible(not (getItem(rightI,itemtype) or getItem(leftI,itemtype)))
end
if righthold then righthold:setPlaying(getItem(rightI,itemtype)) end
if lefthold then lefthold:setPlaying(getItem(leftI,itemtype)) end
end,
itemtype.."Simple")
return self
end
return items

View file

@ -0,0 +1,14 @@
- Figura Discord Hellpers
- kcin2001
- kitcat962
- totaltakeover
- poollovernathan
- meepoffaith
- grandpa_scout
- jimmyhelp
- Figura Discord Free Libraries
- grandpa_scout
- jimmyhelp
- Miscellaneous assets
- ivaskiygood (Dark Fountain emote)
-

View file

@ -164,3 +164,77 @@ function pings.taunt()
end
]]
-- Auto generated script file --
models.akira_eiko_olivia_pink.Add:setPrimaryRenderType("EMISSIVE_SOLID")
models.akira_eiko_olivia_pink.Add:setOpacity(1)
models.akira_eiko_olivia_pink.Add.fountain.inner:setOpacity(1)
models.akira_eiko_olivia_pink.symbols:setVisible(false)
local testBind = keybinds:newKeybind("Тест","key.keyboard.z")
fountain_darking=false
hide_all=false
function pings.open_fountain()
animations.akira_eiko_olivia_pink.fountain_opening:play()
models.akira_eiko_olivia_pink.Add:setParentType("World")
models.akira_eiko_olivia_pink.Add:setPos(player:getPos(delta)*16)
models.akira_eiko_olivia_pink.Add:setRot(0,-player:getBodyYaw()-180,0)
models.akira_eiko_olivia_pink.Add:setPrimaryRenderType("EMISSIVE_SOLID")
end
function pings.setLighed()
end
--testBind.press = pings.test
local open_f = mainPage:newAction()
open_f:title("Fountain")
open_f:item("iron_sword")
open_f.leftClick=pings.open_fountain
function events.entity_init()
--player functions goes here
end
function events.tick()
if fountain_darking then
models.akira_eiko_olivia_pink.Add.fountain.inner:setOpacity(models.akira_eiko_olivia_pink.Add.fountain.inner:getOpacity()+0.02)
if models.akira_eiko_olivia_pink.Add.fountain.inner:getOpacity()>0.98 then
fountain_darking=false
models.akira_eiko_olivia_pink.Add.fountain.inner:setPrimaryRenderType("EMISSIVE_SOLID")
end
end
if hide_all then
models.akira_eiko_olivia_pink.Add:setOpacity(models.akira_eiko_olivia_pink.Add:getOpacity()-0.02)
if models.akira_eiko_olivia_pink.Add:getOpacity()<0.02 then
hide_all=false
models.akira_eiko_olivia_pink.Add:setVisible(false)
end
end
end
--render event, called every time your avatar is rendered
--it have two arguments, "delta" and "context"
--"delta" is the percentage between the last and the next tick (as a decimal value, 0.0 to 1.0)
--"context" is a string that tells from where this render event was called (the paperdoll, gui, player render, first person)
function events.render(delta, context)
--code goes here
end
-- Example code begins here --
--[[local confetti = require("confetti")
confetti.registerSprite(
"blob_single",
textures["blob_single"],
vec(0,72,0,72), 30)
function events.tick()
confetti.newParticle(
"blob_single",
player:getPos()+vec(0,math.random(),0),
vec(0,0,0)
)
end
]]

File diff suppressed because it is too large Load diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 575 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 316 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1,018 B

View file

@ -0,0 +1,221 @@
---- Confetti - A Custom Particle Library by manuel_2867 ----
---@class Confetti
local Confetti = {}
local Particles = {}
local Instances = {}
local modelinstances = models:newPart("confetti"..client.intUUIDToString(client.generateUUID())):setParentType("World"):newPart("Instances")
local DEFAULT_LIFETIME = 20
local math_lerp = math.lerp
-- Metatable change for syncing emissive SpriteTask to the regular one
local SpriteMap = {}
local SpriteTask__index = figuraMetatables.SpriteTask.__index
figuraMetatables.SpriteTask.__index = {}
for key, value in pairs(SpriteTask__index) do
figuraMetatables.SpriteTask.__index[key] = function(self,...)
if SpriteMap[self] then
value(SpriteMap[self],...)
end
return value(self,...)
end
end
---Default ticker
---@param instance Confetto
function Confetti.defaultTicker(instance)
local opts = instance.options
instance._position = instance.position
instance._rotation = instance.rotation
instance._scale = instance.scale
instance.velocity = (instance.velocity + opts.acceleration) * opts.friction
instance.position = instance.position + instance.velocity
instance.scale = instance.scale + opts.scaleOverTime
instance.rotation = instance.rotation + opts.rotationOverTime
end
---Default renderer
---@param instance Confetto
function Confetti.defaultRenderer(instance, delta, context, matrix)
if context == "PAPERDOLL" then return end
instance.mesh:setPos((math_lerp(instance._position,instance.position,delta))*16)
instance.mesh:setRot(math_lerp(instance._rotation,instance.rotation,delta))
instance.mesh:setScale(math_lerp(instance._scale,instance.scale,delta))
end
---@class ConfettoOptions
---@field lifetime number|nil Initial lifetime in ticks
---@field acceleration Vector3|number|nil Vector in world space or a number which accelerates forwards (positive) or backwards (negative) in the current movement direction
---@field friction number|nil Number of friction to slow down the particle. Value of 1 is no friction, value <1 slows it down, value >1 speeds it up.
---@field scale Vector3|number|nil Initial scale when spawning
---@field scaleOverTime Vector3|number|nil Change of scale every tick
---@field rotation Vector3|number|nil Initial rotation when spawning
---@field rotationOverTime Vector3|number|nil Change of rotation every tick
---@field billboard boolean|nil Makes the particle always face the camera
---@field emissive boolean|nil Makes the particle emissive.
---@field ticker fun(particle: Confetto)|nil Function called each tick. Will overwrite the default behavior which calculates position, velocity, rotation and scale. To keep default behavior, call `Confetti.defaultTicker(particle)` before your own code.
---@field renderer fun(particle: Confetto, delta: number, context: Event.Render.context, matrix: Matrix4)|nil Function called each frame. Will overwrite the default behavior which smoothes the pos,rot,scale if it was calculated correctly by the ticker. To keep default behavior, call `Confetti.defaultRenderer(particle, delta, context, matrix)` before your own code.
local ConfettoOptions = {}
local DefaultConfettoOptions = {
lifetime = DEFAULT_LIFETIME,
acceleration = vec(0,0,0),
friction = 1,
scale = vec(1,1,1),
scaleOverTime = vec(0,0,0),
rotation = vec(0,0,0),
rotationOverTime = vec(0,0,0),
billboard=false,
emissive=false,
ticker=Confetti.defaultTicker,
renderer=Confetti.defaultRenderer
}
---@class Confetto
---@field mesh ModelPart The model part
---@field task SpriteTask|nil The sprite task if it's a sprite particle. (If emissive, not a real SpriteTask but a fake one because internally it uses two actual SpriteTasks to have a normal layer and an emissive layer above it. This is so you can still just use one line of code to access both of them at the same time internally.)
---@field position Vector3 Current position in world coordinates
---@field _position Vector3 Last tick position
---@field velocity Vector3 The particles velocity
---@field lifetime number Remaining lifetime in ticks
---@field scale Vector3|number Current scale
---@field _scale Vector3|number Last tick scale
---@field rotation Vector3|number Current rotation
---@field _rotation Vector3|number Last tick rotation
---@field options ConfettoOptions
local Confetto = {}
Confetto.__index = Confetto
function Confetto:new(mesh, task, pos, vel, bounds, pivot, options)
return setmetatable({
mesh=mesh,
task=task,
position=pos,
_position=pos,
velocity=vel,
lifetime=options.lifetime,
scale=options.scale,
_scale=options.scale,
rotation=options.rotation,
_rotation=options.rotation,
bounds=bounds,
pivot=pivot,
options=options
}, Confetto)
end
--- Register a Mesh Particle
---@param name string
---@param mesh ModelPart
---@param lifetime number|nil Lifetime in ticks
---@return nil
function Confetti.registerMesh(name, mesh, lifetime)
assert(mesh, "Model Part does not exist! Double check the path, spelling, and if you saved your model file.")
if mesh:getType() ~= "GROUP" then logJson('[{color="yellow",text="[WARNING] "},{color:"white",text:"You are creating a particle by targeting a model part directly, instead of a group. This can cause unexpected behavior. It is recommended to use a group that is positioned at (0,0,0) instead. If you know what you are doing, to get rid of this warning simply delete this line of code."}]') end
Particles[name] = {mesh=mesh,lifetime=lifetime or DEFAULT_LIFETIME}
mesh:setVisible(false)
end
--- Register a Sprite Particle
---@param name string
---@param sprite Texture The texture file to use
---@param bounds Vector4 (x,y,z,w) with x,y top left corner (inclusive) and z,w bottom right corner (inclusive), in pixels
---@param lifetime number|nil Lifetime in ticks. Default is 20.
---@param pivot Vector2|nil Offset to change pivot point. 0,0 is top left corner. Default is in center.
---@return nil
function Confetti.registerSprite(name, sprite, bounds, lifetime, pivot)
if not sprite then
logTable(textures:getTextures())
error("Texture does not exist. Use the correct name shown in the list above. It may need a model name before the texture name separated by a dot.")
end
Particles[name] = {sprite=sprite,bounds=bounds,lifetime=lifetime or DEFAULT_LIFETIME,pivot=pivot or vec((bounds.z+1-bounds.x)/2,(bounds.w+1-bounds.y)/2)}
end
--- Spawn a registered custom particle without checking arguments. This uses less instructions, but doesn't allow different argument types. In the options, scaleOverTime, rotationOverTime and acceleration must be Vector3 if used.
---@param name string
---@param pos Vector3 Position in world coordinates
---@param vel Vector3 Velocity vector
---@param options ConfettoOptions
---@return Confetto
function Confetti.newParticleUnchecked(name, pos, vel, options)
local ptcl = Particles[name]
options.lifetime = options.lifetime or ptcl.lifetime
setmetatable(options, { __index = DefaultConfettoOptions })
local meshInstance, task
if ptcl.mesh ~= nil then
meshInstance = modelinstances:newPart("_")
ptcl.mesh:copy("meshholder"):moveTo(meshInstance):setParentType(options.billboard and "CAMERA" or "NONE"):setVisible(true)
else
meshInstance = modelinstances:newPart("_")
local holder = meshInstance:newPart("taskholder")
:setParentType(options.billboard and "CAMERA" or "NONE")
local x,y,z,w = ptcl.bounds:unpack()
task = (holder:newPart("_")):newSprite("_")
:setPos(ptcl.pivot.xy_)
:setTexture(ptcl.sprite)
:setDimensions(ptcl.sprite:getDimensions())
:setUVPixels(x,y)
:setRegion(z+1-x,w+1-y)
:setSize(z+1-x,w+1-y)
if options.emissive then
SpriteMap[task] = (holder:newPart("_")):newSprite("_")
:setPos(ptcl.pivot.xy_)
:setTexture(ptcl.sprite)
:setDimensions(ptcl.sprite:getDimensions())
:setUVPixels(x,y)
:setRegion(z+1-x,w+1-y)
:setSize(z+1-x,w+1-y)
:setRenderType("EMISSIVE")
end
end
if options.emissive then
meshInstance:setSecondaryTexture("PRIMARY")
end
local particle = Confetto:new(meshInstance, task, pos, vel, ptcl.bounds, Particles[name].pivot, options)
Instances[client.intUUIDToString(client.generateUUID())] = particle
return particle
end
--- Spawn a registered custom particle
---@param name string
---@param pos Vector3 Position in world coordinates
---@param vel Vector3|nil Velocity vector
---@param options ConfettoOptions|nil
---@return Confetto
function Confetti.newParticle(name, pos, vel, options)
vel = vel or vec(0,0,0)
options = options or {}
if type(options.scaleOverTime) == "number" then
options.scaleOverTime = vec(options.scaleOverTime,options.scaleOverTime,options.scaleOverTime)
end
if type(options.rotationOverTime) == "number" then
options.rotationOverTime = vec(options.rotationOverTime,options.rotationOverTime,options.rotationOverTime)
end
if type(options.acceleration) == "number" then
options.acceleration = vel:normalized() * options.acceleration
end
return Confetti.newParticleUnchecked(name, pos, vel, options)
end
function events.TICK()
for key, instance in pairs(Instances) do
instance.options.ticker(instance)
instance.lifetime = instance.lifetime - 1
if instance.lifetime <= 0 then
modelinstances:removeChild(instance.mesh)
if instance.task then
SpriteMap[instance.task] = nil
end
Instances[key] = nil
end
end
end
function events.RENDER(delta, context, matrix)
for _, instance in pairs(Instances) do
instance.options.renderer(instance, delta, context, matrix)
end
end
return Confetti

Binary file not shown.

After

Width:  |  Height:  |  Size: 112 B

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 112 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 243 B

View file

@ -12,7 +12,6 @@ example:addAllOverrider(animations.akira_eiko_olivia_pink.spyglog)
example:addAllOverrider(animations.akira_eiko_olivia_pink.spyglog2)
example:addAllOverrider(animations.akira_eiko_olivia_pink.attackL)
example:addAllOverrider(animations.akira_eiko_olivia_pink.attackR)
example:addAllOverrider(animations.akira_eiko_olivia_pink.taunt_01)
example:addAllOverrider(animations.akira_eiko_olivia_pink.taunt_02)
example:addAllOverrider(animations.akira_eiko_olivia_pink.taunt_03)
@ -51,13 +50,19 @@ function camera.press()
sounds:playSound("item.spyglass.use", player:getPos(), 1, 1, false)
models.akira_eiko_olivia_pink.root.RightArm.RightForeArm.RightHand.RightCamera:setVisible(true)
animations.akira_eiko_olivia_pink.spyglog2:setPlaying(true)
models.akira_eiko_olivia_pink.root.Body.Elytra:setPrimaryTexture("Custom", textures["elytra"])
models.akira_eiko_olivia_pink.RipeCamera:moveTo(models.akira_eiko_olivia_pink.root.RightArm.RightForeArm.RightHand)
models.akira_eiko_olivia_pink.root.RightArm.RightForeArm.RightHand.RipeCamera:setPrimaryTexture("Custom", textures["camera"])
models.akira_eiko_olivia_pink.root.RightArm.RightForeArm.RightHand.RipeCamera:setVisible(true)
keyHeld = true
end
function camera.release()
sounds:playSound("item.spyglass.stop", player:getPos(), 1, 1, false)
models.akira_eiko_olivia_pink.root.RightArm.RightForeArm.RightHand.RightCamera:setVisible(false)
sounds:playSound("item.spyglass.stop_using", player:getPos(), 1, 1, false)
models.akira_eiko_olivia_pink.root.RightArm.RightForeArm.RightHand.RipeCamera:setPrimaryTexture("Custom", textures["camera"])
models.akira_eiko_olivia_pink.root.RightArm.RightForeArm.RightHand.RipeCamera:setVisible(false)
animations.akira_eiko_olivia_pink.spyglog2:setPlaying(false)
models.akira_eiko_olivia_pink.root.RightArm.RightForeArm.RightHand.RipeCamera:moveTo(models.akira_eiko_olivia_pink)
keyHeld = false
end
@ -79,13 +84,13 @@ end
function events.render(delta,context)
local firstPerson = context == "FIRST_PERSON"
models.akira_eiko_olivia_pink.root.Head:setVisible(not (renderer:isFirstPerson() and context == "OTHER"))
if keyHeld then
models.akira_eiko_olivia_pink.root.RightArm:setVisible(not (renderer:isFirstPerson() and context == "OTHER"))
end
end
-- function events.render(delta,context)
-- local firstPerson = context == "FIRST_PERSON"
-- models.akira_eiko_olivia_pink.root.Head:setVisible(not (renderer:isFirstPerson() and context == "OTHER"))
-- if keyHeld then
-- models.akira_eiko_olivia_pink.root.RightArm:setVisible(not (renderer:isFirstPerson() and context == "OTHER"))
-- end
-- end
function events.tick() -- every tick...
if curxp < player:getExperienceLevel() then -- ...compare LV to what it was, and if it's higher...
@ -127,7 +132,6 @@ function models.akira_eiko_olivia_pink.preRender()
end
end
--change nameplate
function events.POST_RENDER(delta)
-- Get the world-space position of the head plus the offset of the nameplate.
@ -145,12 +149,12 @@ local bladeHeld = false
function pings.examplePing(state)
bladeHeld = state
end
local exampleKey = keybinds:newKeybind("Show Rose Gold Rapier", "key.keyboard.p")
-- local exampleKey = keybinds:newKeybind("Show Rose Gold Rapier", "key.keyboard.p")
exampleKey.press = function()
bladeHeld = not bladeHeld
pings.examplePing(bladeHeld)
end
-- exampleKey.press = function()
-- bladeHeld = not bladeHeld
-- pings.examplePing(bladeHeld)
-- end
function events.item_render(item, mode)
if item:getName():find("Rose Gold Rapier") or bladeHeld then

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 132 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 135 B

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 595 B

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,58 @@
-- Auto generated script file --
models.model:setVisible(false)
models.model.Add:setPrimaryRenderType("TRANSLUCENT_CULL")
models.model.Add:setOpacity(1)
models.model.Add.fountain.inner:setOpacity(0)
models.model.root:setPrimaryTexture("SKIN")
models.model.symbols:setVisible(false)
local testBind = keybinds:newKeybind("Тест","key.keyboard.z")
fountain_darking=false
hide_all=false
function pings.open_fountain()
animations.model.fountain_opening:play()
models.model.Add:setParentType("World")
models.model.Add:setPos(player:getPos(delta)*16)
models.model.Add:setRot(0,-player:getBodyYaw()-180,0)
end
function pings.setLighed()
end
--testBind.press = pings.test
local weel = action_wheel:newPage()
action_wheel:setPage(weel)
local open_f = weel:newAction()
open_f:title("Открыть Фонтан")
open_f:item("iron_sword")
open_f.leftClick=pings.open_fountain
function events.entity_init()
--player functions goes here
end
function events.tick()
if fountain_darking then
models.model.Add.fountain.inner:setOpacity(models.model.Add.fountain.inner:getOpacity()+0.02)
if models.model.Add.fountain.inner:getOpacity()>0.98 then
fountain_darking=false
models.model.Add.fountain.inner:setPrimaryRenderType("TRANSLUCENT_CULL")
end
end
if hide_all then
models.model.Add:setOpacity(models.model.Add:getOpacity()-0.02)
if models.model.Add:getOpacity()<0.02 then
hide_all=false
models.model.Add:setVisible(false)
end
end
end
--render event, called every time your avatar is rendered
--it have two arguments, "delta" and "context"
--"delta" is the percentage between the last and the next tick (as a decimal value, 0.0 to 1.0)
--"context" is a string that tells from where this render event was called (the paperdoll, gui, player render, first person)
function events.render(delta, context)
--code goes here
end

View file

@ -0,0 +1,7 @@
{
"authors": [
"akirapink"
],
"name": "Missy",
"description":"Missy from Mandarin Labs"
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 790 B

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,6 @@
-- Autogenerated Essential => Figura script
vanilla_model.PLAYER:setVisible(false)
vanilla_model.ARMOR:setVisible(false)
models.missy:setVisible(true)
vanilla_model.HELD_ITEMS:setVisible(true)
vanilla_model.ELYTRA:setVisible(true)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 428 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

View file

@ -323,7 +323,7 @@ Happy Holidays!
What did you expect?
Chaps, are we cooked?
Baking Bread!
Gakvu: Gakvu
Gakvu: "Gakvu"
A second, funnier Minecraft!
A vision from an angry god!
The wisdom of a glogged!
@ -332,16 +332,27 @@ Can't you do it sometime?
Pushed it in too far...
Green inside!
Intel inside!
AMD inside!
AMD outside!
Groovy, and only sometimes glooby!
Girls...
Boys...
Enbys...
All The Mods 10...
Nvidia beneath the soil, buried 1.8288 meters under!
It is now safe to turn off your computer.
It is no longer safe to turn off your computer.
0625. Willpower, though useful, does not alone a powerful being make.
1009. Early to bed and early to rise makes a "man" healthy but socially dead.
1111. A great change is coming.
1119. Everything not saved will be lost.
1224. At the end of the day... It's night!
1225. The holidays always come, whether you like them or not.
1312. No gods, no masters, no exceptions.
1604. Some conflicts can be resolved. Communicate before it's too late.
1614. The next package in your mailbox will have more value than you initially thought.
1707. Choose your battles.
2020. Nothing is sacred.
2506. Beware not gods, but those who worship them.
2612. Treat with love the relations you treasure.
3200. Don't make a promise you can't keep. If you do, a storm will find you!
4560. Minds are good at being convinced by repeated affirmation.