{"id":"nametakenbonk/enaltcast","name":"enaltcast","scope":"nametakenbonk","platform":"roblox","description":"A fast and easy to use caster","version":"0.1.6","latest":"0.1.6","versions":["0.0.1","0.0.2","0.0.3","0.0.4","0.0.5","0.0.6","0.0.7","0.0.8","0.1.0","0.1.1","0.1.2","0.1.3","0.1.4","0.1.5","0.1.6"],"license":"MIT","licenseRating":"safe","licenseCaveats":["License identified from the packaged LICENSE file; the manifest declared none."],"licenseVerified":true,"dependencies":{"lucasmzreal/fastsignal":{"version":"^10.4.0","alias":"fastsignal"}},"integrity":"14bcbc45135263a04b0301ce4af70d5c881e302960df32303a861a5f39052269","likes":0,"downloads":0,"install":"forest install nametakenbonk/enaltcast","url":"https://forest.dev/p/roblox/nametakenbonk/enaltcast","files":"https://api.forest.dev/ai/package/roblox/nametakenbonk/enaltcast/files","readme":"# EnaltCast\r\n\r\nSuper fast and easy to use casting system. Made for projectile physics that's super optimized and light weight.\r\n\r\n# Credits\r\n\r\nAuthors: Alternative, EnumEnv\r\nVisualiser: FastCast\r\nPenetration/Ricochet: SecureCast\r\n\r\n# Example\r\n\r\n`Server`\r\n\r\n```lua\r\nlocal ReplicatedStorage = game:GetService(\"ReplicatedStorage\")\r\nlocal Fire = ReplicatedStorage.Fire\r\nlocal Caster = require(ReplicatedStorage.EnaltCast).new()\r\nlocal ImpactSignal = Caster.NewSignal()\r\n\r\nFire.OnServerEvent:Connect(function(player, origin, direction)\r\n    local Pararms = RaycastParams.new()\r\n\tPararms.FilterType = Enum.RaycastFilterType.Exclude\r\n\tPararms.FilterDescendantsInstances = {player.Character}\r\n\r\n    local bullet = ReplicatedStorage.Bullet:Clone()\r\n    bullet.Parent = workspace\r\n\r\n    Caster:Cast({\r\n        Speed = 100,\r\n        ExtraForce = Vector3.new(0, -workspace.Gravity / 5, 0),\r\n\t\tRayParams = Pararms,\r\n        RichochetAngle = 10,\r\n        RichochetHardness = 9,\r\n        PenetrationPower = 50,\r\n\t\tOnImpact = ImpactSignal\r\n    }, origin, direction, bullet)\r\nend)\r\n\r\nImpactSignal:Connect(function(...)\r\n    print(...)\r\nend)\r\n```\r\n\r\n`Client`\r\n\r\n```lua\r\nlocal UserInputService = game:GetService(\"UserInputService\")\r\nlocal RpelicatedStorage = game:GetService(\"ReplicatedStorage\")\r\n\r\nlocal Player = game.Players.LocalPlayer\r\nlocal Mouse = Player:GetMouse()\r\n\r\nPlayer.CharacterAdded:Connect(function(character)\r\n\tcharacter.ChildAdded:Connect(function(child)\r\n\t\tif child:IsA(\"Tool\") then\r\n\t\t\tchild.Activated:Connect(function()\r\n\r\n\t\t\t\tlocal origin = character.Head.Position\r\n\t\t\t\tlocal hit = Mouse.Hit\r\n\r\n\t\t\t\tlocal direction = (hit.Position - origin).unit\r\n\r\n\t\t\t\tRpelicatedStorage.Fire:FireServer(origin, direction)\r\n\t\t\tend)\r\n\t\tend\r\n\tend)\r\nend)\r\n```\r\n\r\n# Docs\r\n\r\n## Types\r\n\r\n#### CastConfig\r\n\r\n`Speed: number`: How fast the projectile would move \\\r\n`ExtraForce: Vector3`: An extra force you can use for things like gravity \\\r\n`RayParams: RaycastParams`: The raycast params you want to use \\\r\n`Lifetime: number?`: How long should the projectile should exist before getting deleted \r\n\r\n`RicochetAngle: number?`: The angle at which the projectile can ricochet \\\r\n`RicochetHardness: number?`: How hard the surface should be to ricochet \r\n\r\n`OnImpact: FastSignal.ScriptSignal<RaycastResult, ProjectileData>`: This signal gets fired when the projectile hits something\r\n\r\n## Class\r\n### Functions\r\n\r\n#### `.new(): class`\r\nCreates a new caster class \\\r\n**return:** `class` \r\n#### `:Cast(config: CastConfig, origin: Vector3, direction: Vector3, bullet: BasePart?)` \r\nStarts a new projectile cast \\\r\n**config**: `CastConfig` The configuration of this projectile \\\r\n**origin**: `Vector3` Where the projectile starts \\\r\n**direction**: `Vector3` The direction where the projectile should go \\\r\n**bullet**: `BasePart?` The visual part of the projectile\r\n","readmeTruncated":false}