Kirby V2.0 Script For Roblox
Kirby V2.0 Script For Roblox
DoogleFox]]------------------------------------------------------------------------
-------------------------------------------------------------------------
user = "TrystinGB"
bin = script.Parent
m = Instance.new("Model")
m.Parent = bin.Parent.Parent.Character
m.Name = "KirbyMorph"
p = Instance.new("Part")
p.Parent = m
p.Name = "MainBody"
p.formFactor = ("Symmetric")
p.Size = Vector3.new(4,4,4)
p.CFrame = bin.Parent.Parent.Character.Torso.CFrame
p.BrickColor = BrickColor.new("Light reddish violet")
p.Locked = true
p.CanCollide = true
p.Shape = ("Ball")
p.TopSurface = ("Smooth")
p.BottomSurface = ("Smooth")
d = Instance.new("Decal")
d.Parent = p
d.Face = ("Front")
d.Texture = ("http://www.roblox.com/asset/?id=5732750")
w = Instance.new("Weld")
w.Parent = p
w.Name = "BodyWeld"
w.Part0 = p
w.Part1 = bin.Parent.Parent.Character.Torso
w.C0 = CFrame.new(0,0.2,0)
a1 = Instance.new("Part")
a1.Parent = m
a1.Name = "Left Arm"
a1.formFactor = ("Symmetric")
a1.Size = Vector3.new(2,2,2)
a1.CFrame = bin.Parent.Parent.Character["Left Arm"].CFrame
a1.BrickColor = BrickColor.new("Light reddish violet")
a1.Locked = true
a1.CanCollide = true
a1.Shape = ("Ball")
a1.TopSurface = ("Smooth")
a1.BottomSurface = ("Smooth")
a1w = Instance.new("Weld")
a1w.Parent = a1
a1w.Name = "ArmWeld1"
a1w.Part0 = a1
a1w.Part1 = bin.Parent.Parent.Character["Left Arm"]
a1w.C0 = CFrame.new(0.2,0.2,0)
a2 = Instance.new("Part")
a2.Parent = m
a2.Name = "Right Arm"
a2.formFactor = ("Symmetric")
a2.Size = Vector3.new(2,2,2)
a2.CFrame = bin.Parent.Parent.Character["Left Arm"].CFrame
a2.BrickColor = BrickColor.new("Light reddish violet")
a2.Locked = true
a2.CanCollide = true
a2.Shape = ("Ball")
a2.TopSurface = ("Smooth")
a2.BottomSurface = ("Smooth")
a2w = Instance.new("Weld")
a2w.Parent = a2
a2w.Name = "ArmWeld2"
a2w.Part0 = a2
a2w.Part1 = bin.Parent.Parent.Character["Right Arm"]
a2w.C0 = CFrame.new(-0.2,0.2,0)
l = Instance.new("Part")
l.Parent = m
l.Name = "Left Leg"
l.formFactor = ("Symmetric")
l.Size = Vector3.new(2,2,2)
l.CFrame = bin.Parent.Parent.Character["Left Leg"].CFrame
l.BrickColor = BrickColor.new("Dusty Rose")
l.Locked = true
l.CanCollide = true
l.Shape = ("Ball")
l.TopSurface = ("Smooth")
l.BottomSurface = ("Smooth")
lm = Instance.new("SpecialMesh")
lm.Parent = l
lm.Name = "LegMesh"
lm.MeshType = ("Sphere")
lm.Scale = Vector3.new(0.9,0.9,1.2)
lw = Instance.new("Weld")
lw.Parent = l
lw.Name = "LegWeld"
lw.Part0 = l
lw.Part1 = bin.Parent.Parent.Character["Left Leg"]
lw.C0 = CFrame.new(0.25,0.2,0)
l2 = Instance.new("Part")
l2.Parent = m
l2.Name = "Right Leg"
l2.formFactor = ("Symmetric")
l2.Size = Vector3.new(2,2,2)
l2.CFrame = bin.Parent.Parent.Character["Right Leg"].CFrame
l2.BrickColor = BrickColor.new("Dusty Rose")
l2.Locked = true
l2.CanCollide = true
l2.Shape = ("Ball")
l2.TopSurface = ("Smooth")
l2.BottomSurface = ("Smooth")
l2m = Instance.new("SpecialMesh")
l2m.Parent = l2
l2m.Name = "LegMesh"
l2m.MeshType = ("Sphere")
l2m.Scale = Vector3.new(0.9,0.9,1.2)
l2w = Instance.new("Weld")
l2w.Parent = l2
l2w.Name = "LegWeld2"
l2w.Part0 = l2
l2w.Part1 = bin.Parent.Parent.Character["Right Leg"]
l2w.C0 = CFrame.new(-0.25,0.2,0)
c = bin.Parent.Parent.Character:GetChildren()
for i = 1, #c do
if c[i].className == "Part" then
c[i].Transparency = 1
end
end
for ii = 1, #c do
if c[ii].className == "Hat" then
c[ii]:remove()
end
end
wait()
if bin.Parent.Parent.Character.Head:findFirstChild("face") ~= nil then
bin.Parent.Parent.Character.Head:findFirstChild("face"):remove()
end
-----------------------------------------------------------------------------------
----------------------------------
bp = Instance.new("BodyPosition")
bp.Parent = bin
bp.maxForce = Vector3.new(2000,2000,2000)
enabled = true
function onButton1Down(mouse)
if mouse.Target ~= nil then
if mouse.Target.Parent:findFirstChild("Humanoid") ~= nil then
if enabled == true then
enabled = false
name = mouse.Target.Parent.Name
bp.Parent = mouse.Target.Parent:findFirstChild("Torso")
mouse.Target.Parent.Humanoid.PlatformStand = true
bp.position = bin.Parent.Parent.Character.Torso.Position
function touch(hit)
if hit.Name == "MainBody" then
parts = workspace[name]:GetChildren()
for i = 1, #parts do
if parts[i].className == "Part" then
parts[i]:remove()
end
enabled = true
end
else
wait()
end
end
mouse.Target.Parent:findFirstChild("Torso").Touched:connect(touch)
else
wait()
end
end
end
end
bin.Selected:connect(function(mouse)
mouse.Icon = "rbxasset://textures\\GunCursor.png"
mouse.Button1Down:connect(function() onButton1Down(mouse) end)
end)
--//====================================================\\--
--|| this part was CREATED BY SHACKLUSTER, and then copied into this
kirby script by trystingb
--\\====================================================//--
wait(0.2)
Player = game:GetService("Players").LocalPlayer
PlayerGui = Player.PlayerGui
Cam = workspace.CurrentCamera
Backpack = Player.Backpack
Character = Player.Character
Humanoid = Character.Humanoid
Mouse = Player:GetMouse()
RootPart = Character["HumanoidRootPart"]
Torso = Character["Torso"]
Head = Character["Head"]
RightArm = Character["Right Arm"]
LeftArm = Character["Left Arm"]
RightLeg = Character["Right Leg"]
LeftLeg = Character["Left Leg"]
RootJoint = RootPart["RootJoint"]
Neck = Torso["Neck"]
RightShoulder = Torso["Right Shoulder"]
LeftShoulder = Torso["Left Shoulder"]
RightHip = Torso["Right Hip"]
LeftHip = Torso["Left Hip"]
local sick = Instance.new("Sound",Torso)
sick.SoundId = "rbxassetid://319444224"
sick.Looped = true
sick.Pitch = 1
sick.Volume = 1
local succing = {}
IT = Instance.new
CF = CFrame.new
VT = Vector3.new
RAD = math.rad
C3 = Color3.new
UD2 = UDim2.new
BRICKC = BrickColor.new
ANGLES = CFrame.Angles
EULER = CFrame.fromEulerAnglesXYZ
COS = math.cos
ACOS = math.acos
SIN = math.sin
ASIN = math.asin
ABS = math.abs
MRANDOM = math.random
FLOOR = math.floor
--//=================================\\
--|| CUSTOMIZATION
--\\=================================//
Class_Name = "Template"
Weapon_Name = "Add-ons"
Custom_Colors = {
Custom_Color_1 = BRICKC("Institutional white"); --1st color for the weapon.
Custom_Color_2 = BRICKC("Institutional white"); --2nd color for the weapon.
local Speed = 16
local Effects2 = {}
--//=================================\\
--|| END OF CUSTOMIZATION
--\\=================================//
function createaccessory(attachmentpart,mesh,texture,scale,offset,color)
local acs = Instance.new("Part")
acs.CanCollide = false
acs.Anchored = false
acs.Size = Vector3.new(0,0,0)
acs.CFrame = attachmentpart.CFrame
acs.Parent = Character
acs.BrickColor = color
local meshs = Instance.new("SpecialMesh")
meshs.MeshId = mesh
meshs.TextureId = texture
meshs.Parent = acs
meshs.Scale = scale
meshs.Offset = offset
weldBetween(attachmentpart,acs)
end
function createbodypart(TYPE,COLOR,PART,OFFSET,SIZE)
if TYPE == "Gem" then
local acs = CreatePart(3, Character, "Plastic", 0, 0, COLOR, "Part",
VT(0,0,0))
acs.Anchored = false
acs.CanCollide = false
acs.CFrame = PART.CFrame
local acs2 = CreateMesh("SpecialMesh", acs, "FileMesh", "9756362", "", SIZE,
OFFSET)
weldBetween(PART,acs)
elseif TYPE == "Skull" then
local acs = CreatePart(3, Character, "Plastic", 0, 0, COLOR, "Part",
VT(0,0,0))
acs.Anchored = false
acs.CanCollide = false
acs.CFrame = PART.CFrame
local acs2 = CreateMesh("SpecialMesh", acs, "FileMesh", "4770583", "", SIZE,
OFFSET)
weldBetween(PART,acs)
elseif TYPE == "Eye" then
local acs = CreatePart(3, Character, "Neon", 0, 0, COLOR, "Part", VT(0,0,0))
acs.Anchored = false
acs.CanCollide = false
acs.CFrame = PART.CFrame
local acs2 = CreateMesh("SpecialMesh", acs, "Sphere", "", "", SIZE, OFFSET)
weldBetween(PART,acs)
end
end
--//=================================\\
--|| USEFUL VALUES
--\\=================================//
--//=================================\\
--\\=================================//
--//=================================\\
--|| DEBUFFS / BUFFS
--\\=================================//
--//=================================\\
--\\=================================//
--//=================================\\
--|| SAZERENOS' ARTIFICIAL HEARTBEAT
--\\=================================//
script:WaitForChild("ArtificialHB")
frame = Frame_Speed
tf = 0
allowframeloss = false
tossremainder = false
lastframe = tick()
script.ArtificialHB:Fire()
game:GetService("RunService").Heartbeat:connect(function(s, p)
tf = tf + s
if tf >= frame then
if allowframeloss then
script.ArtificialHB:Fire()
lastframe = tick()
else
for i = 1, math.floor(tf / frame) do
script.ArtificialHB:Fire()
end
lastframe = tick()
end
if tossremainder then
tf = 0
else
tf = tf - frame * math.floor(tf / frame)
end
end
end)
--//=================================\\
--\\=================================//
--//=================================\\
--|| SOME FUNCTIONS
--\\=================================//
function PositiveAngle(NUMBER)
if NUMBER >= 0 then
NUMBER = 0
end
return NUMBER
end
function NegativeAngle(NUMBER)
if NUMBER <= 0 then
NUMBER = 0
end
return NUMBER
end
function Swait(NUMBER)
if NUMBER == 0 or NUMBER == nil then
ArtificialHB.Event:wait()
else
for i = 1, NUMBER do
ArtificialHB.Event:wait()
end
end
end
function NoOutlines(PART)
PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface,
PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10
end
--//=================================\\
--\\=================================//
--//=================================\\
--|| WEAPON CREATION
--\\=================================//
if Player_Size ~= 1 then
for _, v in pairs (Weapon:GetChildren()) do
if v.ClassName == "Motor" or v.ClassName == "Weld" or v.ClassName ==
"Snap" then
local p1 = v.Part1
v.Part1 = nil
local cf1, cf2, cf3, cf4, cf5, cf6, cf7, cf8, cf9, cf10, cf11,
cf12 = v.C1:components()
v.C1 = CF(cf1 * Player_Size, cf2 * Player_Size, cf3 *
Player_Size, cf4, cf5, cf6, cf7, cf8, cf9, cf10, cf11, cf12)
v.Part1 = p1
elseif v.ClassName == "Part" then
for _, b in pairs (v:GetChildren()) do
if b.ClassName == "SpecialMesh" or b.ClassName ==
"BlockMesh" then
b.Scale = VT(b.Scale.x * Player_Size, b.Scale.y *
Player_Size, b.Scale.z * Player_Size)
end
end
end
end
end
for _, c in pairs(Weapon:GetChildren()) do
if c.ClassName == "Part" then
c.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0)
end
end
Weapon.Parent = Character
Humanoid.Died:connect(function()
ATTACK = true
end)
print(Class_Name.." loaded.")
--//=================================\\
--\\=================================//
for _, c in pairs(Weapon:GetChildren()) do
if c.ClassName == "Part" then
c.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0)
end
end
local EyeSizes={
NumberSequenceKeypoint.new(0,0.5,0),
NumberSequenceKeypoint.new(1,0.2,0)
}
local EyeTrans={
NumberSequenceKeypoint.new(0,0,0),
NumberSequenceKeypoint.new(1,1,0)
}
local PE=Instance.new("ParticleEmitter")
PE.LightEmission=0.3
PE.Size=NumberSequence.new(EyeSizes)
PE.Transparency=NumberSequence.new(EyeTrans)
PE.Rotation=NumberRange.new(0,360)
PE.LockedToPart = false
PE.Speed = NumberRange.new(0,0,0)
PE.ZOffset = 0.3
PE.Rate = 999
PE.VelocitySpread = 25
PE.Name = "Particles"
function
CreateParticles(art,accel,drag,lifetime,type,isenabledbydefault,locked,size,speed)
local particle = nil
coroutine.resume(coroutine.create(function(PART)
particle = PE:Clone()
Swait()
particle.Rate = 999
particle.Parent = art
particle.Acceleration = accel
if type == "Fire" then
local EyeSizes={
NumberSequenceKeypoint.new(0,size,size/2),
NumberSequenceKeypoint.new(1,size/4,size/8)
}
particle.Size = NumberSequence.new(EyeSizes)
elseif type == "Smoke" then
local EyeSizes={
NumberSequenceKeypoint.new(0,size/5,0),
NumberSequenceKeypoint.new(1,size*2,0.5)
}
particle.Size = NumberSequence.new(EyeSizes)
elseif type == "Solid" then
local EyeSizes={
NumberSequenceKeypoint.new(0,size,0),
NumberSequenceKeypoint.new(1,size,0)
}
particle.Size = NumberSequence.new(EyeSizes)
end
particle.Lifetime=NumberRange.new(lifetime)
particle.Drag = drag
if locked == true then
particle.LockedToPart = true
end
particle.Speed = NumberRange.new(speed*0.8,speed)
particle.Texture = "http://www.roblox.com/asset/?id=1179557490"
particle.Enabled = isenabledbydefault
particle.Color = ColorSequence.new(Color3.new(255/255, 176/255, 0))
end))
return particle
end
--//=================================\\
--|| DAMAGING
--\\=================================//
function succnearest(position,range)
for i,v in ipairs(workspace:GetChildren()) do
local body = v:GetChildren()
for part = 1, #body do
if((body[part].ClassName == "Part" or body[part].ClassName ==
"MeshPart") and v ~= Character) then
if(body[part].Position - position).Magnitude < range then
local bv = Instance.new("BodyVelocity")
bv.maxForce = Vector3.new(1e9, 1e9, 1e9)
bv.velocity =
CF(body[part].Position,succ.Position).lookVector*80
bv.Parent = body[part]
bv.Name = "SUCC"
game:GetService("Debris"):AddItem(bv, 0.1)
end
end
end
if v.ClassName == "Part" then
if v.Anchored == false and (v.Position - position).Magnitude <
range then
local bv = Instance.new("BodyVelocity")
bv.maxForce = Vector3.new(1e9, 1e9, 1e9)
bv.velocity = CF(v.Position,succ.Position).lookVector*80
bv.Parent = v
bv.Name = "SUCC"
game:GetService("Debris"):AddItem(bv, 0.1)
end
end
end
end
function cover(position,range)
for i,v in ipairs(workspace:GetChildren()) do
local body = v:GetChildren()
for part = 1, #body do
if((body[part].ClassName == "Part" or body[part].ClassName ==
"MeshPart") and v ~= Character) then
if(body[part].Position - position).Magnitude < range then
CreateParticles(body[part],VT(0,-
2,0),5,1,"Smoke",true,false,0.3,0)
if v:FindFirstChild("Humanoid") then
v.Humanoid.PlatformStand = true
end
end
end
end
if v.ClassName == "Part" then
if v.Anchored == false and (v.Position - position).Magnitude <
range then
CreateParticles(v,VT(0,-2,0),5,1,"Smoke",true,false,0.3,0)
end
end
end
end
function cough()
CreateSound("328460122", succ, 3, 1)
poop.VelocitySpread = 25
poop:Emit(150)
cover(CF(succ.Position)*CF(0,0,-1).p,15)
end
--//=================================\\
--|| ATTACK FUNCTIONS AND STUFF
--\\=================================//
function CheckIntangible(Hit)
local ProjectileNames = {"Water", "Arrow", "Projectile", "Effect", "Rail",
"Lightning", "Bullet"}
if Hit and Hit.Parent then
if ((not Hit.CanCollide or CheckTableForString(ProjectileNames,
Hit.Name)) and not Hit.Parent:FindFirstChild("Humanoid")) then
return true
end
end
return false
end
Debris = game:GetService("Debris")
function turnto(pos,part)
part.CFrame = CF(part.Position,VT(pos.X,RootPart.Position.Y,pos.Z))
end
function vacuum()
sick:Play()
local nado = IT("Part")
local mesh = IT("SpecialMesh",nado)
mesh.MeshId = "http://www.roblox.com/asset/?id=102638417"
nado.Transparency = 0.5
nado.CanCollide = false
nado.Anchored = true
local loop = 0
succing = {}
local harm = succ.Touched:Connect(function(hit)
if hit.Anchored == false then
hit:remove()
CreateSound("261732529", succ, 3, 1)
poop2:Emit(1)
end
end)
repeat
Swait()
loop = loop + 75
nado.Parent = Effects
local RayHit,RayPos = CastRay(succ.Position, Mouse.Hit.p, 1000,
Character, false)
local distance = (succ.Position - RayPos).magnitude
mesh.Scale = VT(distance/12,distance/3.2,distance/12)
nado.CFrame = CFrame.new(succ.Position, RayPos) * CFrame.new(0, 0, -
distance/2) * ANGLES(RAD(-90),RAD(loop),RAD(0))
turnto(Mouse.Hit.p,RootPart)
succnearest(RayPos,distance/2.5)
if RayHit ~= nil then
if RayHit.Anchored == false then
local bv = Instance.new("BodyVelocity")
bv.maxForce = Vector3.new(1e9, 1e9, 1e9)
bv.velocity =
CF(RayHit.Position,succ.Position).lookVector*80
bv.Parent = RayHit
bv.Name = "SUCC"
game:GetService("Debris"):AddItem(bv, 0.1)
end
end
local TotalSuccs = math.ceil(distance / 65)
local Direction = CFrame.new(RayPos, succ.Position).lookVector
for i = 1, TotalSuccs do
local NewPos = (RayPos + (Direction * (distance * (i /
TotalSuccs))))
succnearest(NewPos,distance/(i*2.5))
end
until HOLD == false
if #succing>0 then
for e=1,#succing do
if succing[e]~=nil then
local Thing=succing[e]
Thing:remove()
table.remove(succing,e)
end
end
end
succing = {}
harm:disconnect()
nado:remove()
sick:Stop()
end
--//=================================\\
--|| ASSIGN THINGS TO KEYS
--\\=================================//
Humanoid.Changed:connect(function(Jump)
if Jump == "Jump" and (Disable_Jump == true or DISABLEJUMPING == true) then
Humanoid.Jump = false
end
end)
function MouseDown(Mouse)
HOLD = true
vacuum()
end
function MouseUp(Mouse)
HOLD = false
end
function KeyDown(Key)
if Key == "t" and ATTACK == false then
CreateSound("743953262", Head, 3, 1)
end
if Key == "e" and ATTACK == false then
cough()
end
end
function KeyUp(Key)
end
Mouse.Button1Down:connect(function(NEWKEY)
MouseDown(NEWKEY)
end)
Mouse.Button1Up:connect(function(NEWKEY)
MouseUp(NEWKEY)
end)
Mouse.KeyDown:connect(function(NEWKEY)
KeyDown(NEWKEY)
end)
Mouse.KeyUp:connect(function(NEWKEY)
KeyUp(NEWKEY)
end)
--//=================================\\
--\\=================================//
function unanchor()
if UNANCHOR == true then
g = Character:GetChildren()
for i = 1, #g do
if g[i].ClassName == "Part" then
g[i].Anchored = false
end
end
end
end
--//=================================\\
--|| WRAP THE WHOLE SCRIPT UP
--\\=================================//
Humanoid.Changed:connect(function(Jump)
if Jump == "Jump" and (Disable_Jump == true or DISABLEJUMPING == true) then
Humanoid.Jump = false
end
end)
while true do
Swait()
if #Effects2>0 then
for e=1,#Effects2 do
if Effects2[e]~=nil then
local Thing=Effects2[e]
if Thing~=nil then
local Part=Thing[1]
local Mode=Thing[2]
local Delay=Thing[3]
local IncX=Thing[4]
local IncY=Thing[5]
local IncZ=Thing[6]
local Part2=Thing[8]
if Thing[1].Transparency<=1 then
if Thing[2]=="Block1" then
Thing[1].CFrame=Thing[1].CFrame
Mesh=Thing[1].Mesh
Mesh.Scale=Mesh.Scale+VT(Thing[4],Thing[5],Thing[6])
Thing[1].Transparency=Thing[1].Transparency+Thing[3]
elseif Thing[2]=="Cylinder" then
Mesh=Thing[1].Mesh
Mesh.Scale=Mesh.Scale+VT(Thing[4],Thing[5],Thing[6])
Thing[1].Transparency=Thing[1].Transparency+Thing[3]
elseif Thing[2]=="Blood" then
Mesh=Thing[7]
Thing[1].CFrame=Thing[1].CFrame*CF(0,.5,0)
Mesh.Scale=Mesh.Scale+VT(Thing[4],Thing[5],Thing[6])
Thing[1].Transparency=Thing[1].Transparency+Thing[3]
elseif Thing[2]=="Elec" then
Mesh=Thing[1].Mesh
Mesh.Scale=Mesh.Scale+VT(Thing[7],Thing[8],Thing[9])
Thing[1].Transparency=Thing[1].Transparency+Thing[3]
elseif Thing[2]=="Disappear" then
Thing[1].Transparency=Thing[1].Transparency+Thing[3]
end
else
Part.Parent=nil
table.remove(Effects2,e)
end
end
end
end
end
unanchor()
Humanoid.MaxHealth = "inf"
Humanoid.Health = "inf"
if Rooted == false then
Disable_Jump = false
Humanoid.WalkSpeed = Speed
elseif Rooted == true then
Disable_Jump = true
Humanoid.WalkSpeed = 0
end
if sick == nil then
sick = Instance.new("Sound",Torso)
sick.SoundId = "rbxassetid://319444224"
sick.Looped = true
sick.Pitch = 1
sick.Volume = 1
end
if #succing>0 then
for e=1,#succing do
if succing[e]~=nil then
local Thing=succing[e]
Thing.velocity = CF(Thing.Parent.Position,succ.Position).lookVector*80
if HOLD == false then
Thing.velocity = CF(Thing.Parent.Position,succ.Position).lookVector*0
Thing:remove()
table.remove(succing,e)
end
end
end
end
end
--//=================================\\
--\\=================================//
--//====================================================\\--
--|| END OF SCRIPT
--\\====================================================//--