This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local RunService = game:GetService("RunService") | |
local Signal = require(game.ReplicatedStorage.Core.NevermoreSignal) | |
local UnitMixin = require(game.ReplicatedStorage.Mixins.UnitMixin) | |
local class = require(game.ReplicatedStorage.Middleclass) | |
local SpellHandlers = require(game.ServerScriptService.SpellHandlers) | |
local CastResult = require(game.ReplicatedStorage.Game.SpellCastResult) | |
local Combat = require(game.ServerScriptService.Combat) | |
local AuraDatabase = require(game.ReplicatedStorage.AuraDatabase) | |
local ItemDatabase = require(game.ReplicatedStorage.Databases.ItemDatabase) | |
local Aura = require(game.ServerScriptService.Aura) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local Players = game:GetService("Players") | |
local ObjectManager = require(game.ReplicatedStorage.ObjectManager) | |
local DamageInfo = require(game.ReplicatedStorage.Game.DamageInfo) | |
local HealInfo = require(game.ReplicatedStorage.Game.HealInfo) | |
local Aura_C = require(game.ReplicatedStorage.Entities.Aura_C) | |
local Party_C = require(game.ReplicatedStorage.Entities.Party_C) | |
local CombatText = require(game.ReplicatedStorage.Interface.CombatText) | |
local ProjectileService = require(game.ReplicatedStorage.Services.ProjectileService_C) | |
local SpellResult = require(game.ReplicatedStorage.Enums.SpellResult) | |
local ConsoleService = require(game.ReplicatedStorage.Services.ConsoleService) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local function raycast(orig, dir) | |
return workspace:FindPartOnRayWithIgnoreList(Ray.new(orig, dir), {char, workspace.Ignore, workspace.PlayerSpawns, workspace.ItemPickups, workspace.ItemSpawns, workspace.Nodes}) | |
end | |
-- Radius of player's hitbox: | |
local playerRadius = 2.95 | |
-- STEP 1: cast forward into movement direction to find initial collision with wall: | |
-- (i.e. so you dont teleport the player into wall to begin with) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local SpellResistType = { | |
SpellResult.Miss, | |
SpellResult.Resist, | |
SpellResult.Resist75, | |
SpellResult.Resist50, | |
SpellResult.Resist25, | |
SpellResult.ResistNone, | |
} | |
local SPELL_RESISTANCE = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local mathLib = {} | |
function mathLib.Lerp(start, goal, alpha) | |
return start * (1 - alpha) + goal * alpha | |
end | |
function mathLib.Round(num, numDecimalPlaces) | |
local mult = 10^(numDecimalPlaces or 0) | |
return math.floor(num * mult + 0.5) / mult | |
end | |
function newStack () | |
return {""} -- starts with an empty string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--nigger | |
local PLAYER_EVENT_ON_DUEL_END = 11 | |
local PLAYER_EVENT_ON_COMMAND = 42 | |
local POWER_MANA = 0 | |
local function OnDuelEnd(event, winner, loser, type) | |
winner:SetHealth(winner:GetMaxHealth()) | |
if winner:GetPowerType() == POWER_MANA then | |
winner:SetPower(POWER_MANA, winner:GetMaxPower(POWER_MANA)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local Orakel = require(game.ReplicatedStorage.Orakel.Main) | |
local mathLib = Orakel.LoadModule("MathLib") | |
local Die = require(game.ReplicatedStorage.Die) | |
local Combat = {} | |
local UnitCombatDieSides = require(game.ReplicatedStorage.Enums.UnitCombatDieSides) | |
local DamageSchool = require(game.ReplicatedStorage.Enums.DamageSchool) | |
local EquipmentSlot = require(game.ReplicatedStorage.Enums.EquipmentSlot) | |
local UNARMED_DAMAGE = NumberRange.new(1, 3) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local char = script.Parent | |
local Root = char:WaitForChild("HumanoidRootPart") | |
local map = workspace.CurrentMap | |
local Abyss = require(game.ReplicatedStorage.Abyss.Main) | |
local npcLib = Abyss.LoadModule("NpcLib") | |
local pathLib = Abyss.LoadModule("PathLib") | |
local assetLib = Abyss.LoadModule("AssetLib") | |
local physLib = Abyss.LoadModule("PhysLib") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Pathfind(target, startPos, goalPos) | |
curStatus = "Pathfinding" | |
local abortPathfind = false | |
--GetNearestNode(position, returnBrick, dir, masterTable) | |
--GetNearestNodeVis(subject, position, visRange, returnBrick, dir, masterTable, ignore) | |
local startID = pathLib.GetNearestNodeVis(Root, startPos, losRange, false, map.Nodes, masterTable, {char, workspace.NPCs}) | |
local goalID = NEW_GOAL_NODE or pathLib.GetNearestNodeVis(target, goalPos, losRange, false, map.Nodes, masterTable, {char, workspace.NPCs}) | |
local path = pathLib.AStar(masterTable, startID, goalID) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local Vector2 = {} | |
local sqrt = math.sqrt | |
local acos = math.acos | |
local abs = math.abs | |
function Vector2.new(x, y) | |
assert(tonumber(x) or (x == nil), "Vector2 coordinates can only be numbers") | |
assert(tonumber(x) or (x == nil), "Vector2 coordinates can only be numbers") | |
local vec2 = {} | |
setmetatable(vec2, Vector2) |