Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Scripted By coolallball
- wait()
- local Player=game.Players.LocalPlayer
- repeat wait()
- until Player
- local Char=Player.Character
- repeat wait()
- until Char
- local CurrentEffects={}
- local CurrentDamages={}
- local Human=Char.Humanoid
- local LArm=Char["Left Arm"]
- local RArm=Char["Right Arm"]
- local LLeg=Char["Left Leg"]
- local RLeg=Char["Right Leg"]
- local Torso=Char.Torso
- local RS=Torso["Right Shoulder"]
- local LS=Torso["Left Shoulder"]
- local RH=Torso["Right Hip"]
- local LH=Torso["Left Hip"]
- local Head=Char.Head
- local Neck=Torso.Neck
- local RootPart=Char.HumanoidRootPart
- local RootJoint=RootPart.RootJoint
- local equipped=false
- local Debounce=false
- local Anim="Idle"
- local chat = game:GetService("Chat")
- local Mouse=Player:GetMouse()
- local Lighting=game.Lighting
- local cam=workspace.CurrentCamera
- local cf=CFrame.new
- local v3=Vector3.new
- local c3=Color3.new
- local it=Instance.new
- local angles=CFrame.Angles
- local rad=math.rad
- local ran=math.random
- local huge=math.huge
- local attacking=false
- Tool=script.Parent
- necko=cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
- LHC0=cf(-1,-1,0,-0,-0,-1,0,1,0,1,0,0)
- LSC0=cf(-1, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
- RHC0=cf(1,-1,0,0,0,1,0,1,0,-1,-0,-0)
- RSC0=cf(1, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
- ROOTC0 = cf(0, 0, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
- --why do people label stuff with comments, y.
- r=game:service'RunService'.RenderStepped
- clerp=function(a,b,t)
- return a:lerp(b,t)
- end
- Inp=Player:GetChildren()
- Human.WalkSpeed=16
- Human.JumpPower=50
- for i=1,#Inp do
- if Inp[i]:IsA('Sound') then Inp[i]:Remove() end
- end
- --Functions
- function FindDist(a,b)
- return math.sqrt((b.p.x-a.p.x)^2+(b.p.y-a.p.y)^2+(b.p.z-a.p.z)^2)
- end
- Round=function(Num)
- local mid=math.ceil(Num)
- mid=mid-.5
- if Num>=mid then
- return math.ceil(Num)
- else return math.floor(Num)
- end
- end
- --Damage function
- function Damage(part,min,max,range,font)
- for i,v in pairs(workspace:GetChildren()) do
- if v:FindFirstChild('Humanoid') and v:FindFirstChild('Torso') and v.ClassName=="Model" and FindDist(part,v.Torso.CFrame)<=range and v.Name~= Player.Name then
- local dmg=Round(math.random(min,max))
- local bil=Instance.new("BillboardGui",v:FindFirstChild("Torso"))
- bil.Adornee=v:FindFirstChild("Torso")
- bil.Size=UDim2.new(0, 500, 0, 500)
- bil.ExtentsOffset=Vector3.new(ran(-3,3),ran(-3,3),ran(-3,3))
- local tx=Instance.new("TextLabel",bil)
- tx.Text=""..dmg..""
- tx.Font="Cartoon"
- tx.FontSize="Size60"
- tx.TextWrapped = false
- tx.TextStrokeTransparency = 0
- tx.TextColor = BrickColor.new("Pastel white")
- tx.TextXAlignment = "Center"
- tx.TextYAlignment = "Center"
- tx.TextWrapped = false
- tx.SizeConstraint = "RelativeXY"
- v:FindFirstChild('Humanoid'):TakeDamage(math.random(min,max))
- spawn(function()
- for ii=1,10 do r:wait()
- tx.TextTransparency=ii/10 end
- bil:Destroy() end)
- end end end
- --Folders+More functions
- Effects=Instance.new("Folder",Char)
- Effects.Name="Effects"
- Sounds=Instance.new("Folder",Char)
- Sounds.Name="Sounds"
- part=function(parent,anchored,cancollide,size,cframe,col3,material,trans)
- local p=it("Part",parent)
- p.Anchored=anchored
- p.CanCollide=cancollide
- p.Size=size
- p.CFrame=cframe
- p.Color=col3
- p.Material=material
- p.Transparency=trans
- return p
- end
- mesh=function(parent,ttype,scale)
- local m=it("SpecialMesh",parent)
- m.MeshType=ttype
- m.Scale=scale
- return m
- end
- spmesh=function(parent,id,scale)
- local m=it("SpecialMesh",parent)
- m.MeshId=id
- m.Scale=scale
- return m
- end
- local Smooth=function(Table)
- for _, v in pairs(Table) do
- if v.ClassName=="Part" then
- v.TopSurface,v.BottomSurface,v.BackSurface,v.FrontSurface,v.LeftSurface,v.RightSurface=10,10,10,10,10,10 end end
- end
- clicked=false
- xing=false
- Mouse.Button1Down:connect(function(k)
- if (Mouse.hit.p-Torso.Position).magnitude<=150 then
- clicked=true end
- end)
- DoStuff=function() spawn(function()
- clicked=false
- local from=part(Char,true,false,v3(1,1,1),Torso.CFrame*cf(ran(-5,5),0,ran(5,10)),c3(0,0,0),'Plastic',1)
- local down=Ray.new(from.Position,v3(0,-999,0))
- local partt,pos=workspace:FindPartOnRayWithIgnoreList(down,Char:children(),false,true)
- if partt then
- local ransize=math.random(3,5)
- local gfxb=part(Effects,true,false,v3(ransize,ransize,ransize),CFrame.new(pos)*cf(0,-ransize/2,0),partt.Color,partt.Material,partt.Transparency)
- gfxb.TopSurface=partt.TopSurface
- gfxb.BottomSurface=partt.BottomSurface
- gfxb.LeftSurface=partt.LeftSurface
- gfxb.RightSurface=partt.RightSurface
- gfxb.BackSurface=partt.BackSurface
- gfxb.FrontSurface=partt.FrontSurface
- local fx=part(gfxb,false,false,v3(gfxb.Size.X+gfxb.Size.X/25,gfxb.Size.Y+gfxb.Size.X/25,gfxb.Size.Z+gfxb.Size.X/25),gfxb.CFrame,c3(1,1,0),"Neon",.85)
- spawn(function()
- while r:wait() do
- fx.CFrame=gfxb.CFrame
- end
- end)
- for _=1,70 do r:wait()
- gfxb.CFrame=gfxb.CFrame*angles(rad(1),rad(1),rad(1))+v3(0,8/70,0)
- end
- local DownFromFloaty=Ray.new(gfxb.Position,v3(0,-999,0))
- local partt,pos=workspace:FindPartOnRayWithIgnoreList(DownFromFloaty,Char:children(),false,true)
- coroutine.resume(coroutine.create(function()
- repeat r:wait() spawn(function()
- if pos then
- local cir=part(Effects,true,false,v3(0,0,0),cf(pos)*angles(rad(-90),0,0),c3(1,1,0),"Plastic",0)
- local cm=spmesh(cir,"rbxassetid://3270017",v3(2,2,1))
- for i=1,50 do r:wait()
- cm.Scale=cm.Scale:Lerp(cm.Scale+v3(.4,.4,0),.3)
- cir.Transparency=i/50
- end
- cir:Destroy()
- end end) wait(.2)
- until clicked==true
- end))
- repeat r:wait() gfxb.CFrame=gfxb.CFrame*angles(rad(1),rad(1),rad(1))+v3(0,.05*math.sin(tick()*2),0) until clicked==true
- local bv=Instance.new('BodyVelocity',gfxb)
- bv.maxForce=v3(huge,huge,huge)
- bv.Velocity=(Mouse.hit.p-gfxb.Position).unit*150
- local reach=part(Char,true,false,v3(1,1,1),Mouse.hit,c3(0,0,0),'Plastic',1)
- gfxb.Anchored=false
- local waittime=0
- repeat r:wait()
- waittime=waittime+1/60
- until (reach.Position-gfxb.Position).Magnitude<=3 or waittime>7
- if waittime>7 then
- gfxb:Destroy()
- reach:Destroy()
- from:Destroy()
- xing=false
- elseif waittime<7 and (reach.Position-gfxb.Position).Magnitude<=3 then
- local down1=Ray.new(gfxb.Position,v3(0,-999,0))
- local partt1,pos1=workspace:FindPartOnRayWithIgnoreList(down1,Char:children(),false,true)
- if partt1 then
- gfxb.Anchored=true
- local ss={}
- Damage(gfxb.CFrame,40,80,gfxb.Size.x+.3)
- spawn(function()
- for p=1,15 do spawn(function()
- local b=part(Effects,false,true,v3(1,1,1),cf(pos1),partt1.Color,partt1.Material,partt1.Transparency)
- table.insert(ss,b)
- end)
- end
- end)
- spawn(function()
- for ii=1,7 do
- local s=part(Effects,true,true,v3(ran(5,8),3,ran(5,8)),cf(pos1)*cf(ran(-1,1),0,ran(-1,1))*angles(rad(ran(-10,10)),rad(ran(-10,10)),rad(ran(-10,10))),partt1.Color,partt1.Material,partt1.Transparency)
- table.insert(ss,s)
- end end)
- wait(4)
- for iv=1,#ss do spawn(function()
- for v=1,60 do r:wait()
- ss[iv].Transparency=v/60
- gfxb.Transparency=v/60
- fx.Transparency=.85+v/50
- end ss[iv]:Destroy()end)
- end
- end
- gfxb:Destroy()
- else
- gfxb:Destroy()
- reach:Destroy()
- from:Destroy()
- xing=false
- end
- else warn'No floor detected.'
- end
- end)
- end
- Mouse.KeyDown:connect(function(k)
- if k=="x" and xing==false then
- xing=true
- DoStuff()
- xing=false
- end
- end)
Add Comment
Please, Sign In to add comment