Can you create a roblox ability that is basically a gravity bomb? I have this script…
- User
Can you create a roblox ability that is basically a gravity bomb?
I have this script that is apart of a modular ability system:
local AbilityModule = {} AbilityModule.Name = script:GetAttribute("Name") AbilityModule.Description = script:GetAttribute("Description") AbilityModule.Power = script:GetAttribute("Power") AbilityModule.Price = script:GetAttribute("Price") AbilityModule.Rarity = script:GetAttribute("Rarity") AbilityModule.Level = script:GetAttribute("Level") AbilityModule.Upgradable = script:GetAttribute("Upgradable") AbilityModule.UseCinderblocks = script:GetAttribute("UseCinderblocks") AbilityModule.Passive = script:GetAttribute("Passive") function AbilityModule.Activate(player) print(player.Name .. " activated ability: " .. AbilityModule.Name) end function AbilityModule.Deactivate(player) print(player.Name .. " deactivated ability: " .. AbilityModule.Name) end function AbilityModule.Cancel(player) print(player.Name .. " canceled ability: " .. AbilityModule.Name) end function AbilityModule.Passive(player) -- This ability is not passive end return AbilityModuleBasically, the gravity bomb has a few things happen:
1: When activated, the player's location is marked, and every single player in a 70 stud radius starts getting pulled into the player's location using body velocity that updates live with the players location, so if the user moves, the victim is still pulled into them.
Think of this as a black hole
When a victim gets pulled and is within 5 studs of the user, then a certain module is used, that is:
shockwavemodule.Shockwave(root.Position - position of the player, 14 - size, 90 -intensity (force of body velocity), {player.Character - this is the ignore list}, 1 - speed multiplier of the effect, Color3.fromRGB(20, 20, 20) - color3 of the shockwave effect, 0 - custom transparency keep at 0, true - if the victim gets damaged, 25 - amount of damage, false - if the shield that is another ability isn't ignored from this, char - the person that the shockwave came from)
Shockwave module is in: ReplicatedStorage.GameModules.Shockwave
When a victim is launched from shockwave when they get close, then the victim is immune to the gravity pull towards the player, but everyone else being pulled is still pulled in unless they get hit.
Can you do this?
Also, add sounds for activating and when a player gets launched, as well as a lot of particles (script.Objects.ParticleHolder), this has multiple attachments that go in the players rootpart. I will do the enabling and stuff of the particles, so make a blank function that is fired when activate is fired.
The gravity bomb should last for about 12 seconds of pulling players in and launching them outwards.
Don't forget to ignore the user, they can't get pulled by their own ability. Allow the gravity bomb to work with NPC's and players both.
Important! : Don't use Deactivate or Passive or Cancel
- Assistant