Universal Script 📌
16 Views
1 Executions

Cool destruction hammer script

Universal Script 📌
Epikverity
Epikverity10K executions
4 days ago · Updated

Reviewed by QueueSherlockPaid revieweron How review works

Get an executor
Please login to perform these actions:

Does it work?

No reports yet

No reports yet. Tried it? Be the first to say.

Also noticed:

Description

Very cool hammer that can break anything and ragdoll player

View Raw
local P,RS,UIS,Deb=game:GetService("Players"),game:GetService("RunService"),game:GetService("UserInputService"),game:GetService("Debris")
local plr,cam,ter=P.LocalPlayer,workspace.CurrentCamera,workspace.Terrain
local V3=Vector3.new
local C={Reach=9,R=6,Cell=2,Max=6,Imp=55,CD=.9,Life=12,MaxShards=600,RagTime=6,RagPow=70,Heavy=15,Bounce=.25,MinSpeed=14,
	Snd={"rbxassetid://9118616096","rbxassetid://9118617342","rbxassetid://9118615862"}}
local power=1
local HS,HDS=V3(.35,4,.35),V3(1.1,1.1,2.1)
local folder=Instance.new("Folder") folder.Name="ClientDebris" folder.Parent=workspace
local flying,recs,trecs,rag={},{},{},{}

local function spr(k,d,p) return {k=k,d=d,pos=p,vel=Vector3.zero,target=p} end
local function upd(s,dt)
	local n=math.max(1,math.ceil(dt*120)) local h=dt/n
	for _=1,n do s.vel+=((s.target-s.pos)*s.k-s.vel*s.d)*h s.pos+=s.vel*h end
end
local function mk(size,mat,col)
	local p=Instance.new("Part") p.Size=size p.Material=mat p.Color=col
	p.CanCollide=false p.CanQuery=false p.CanTouch=false
	p.TopSurface=Enum.SurfaceType.Smooth p.BottomSurface=Enum.SurfaceType.Smooth
	return p
end
local function parts()
	local h=mk(HS,Enum.Material.Wood,Color3.fromRGB(110,75,45)) h.Name="Handle"
	return h,mk(HDS,Enum.Material.Metal,Color3.fromRGB(95,95,100))
end

local function sound(pos)
	local a=mk(V3(.2,.2,.2),Enum.Material.Plastic,Color3.new()) a.Anchored=true a.Transparency=1 a.Position=pos a.Parent=folder
	for _,id in C.Snd do
		local s=Instance.new("Sound") s.SoundId=id s.Volume=1.2 s.RollOffMaxDistance=200 s.PlaybackSpeed=.9+math.random()*.2 s.Parent=a s:Play()
	end
	Deb:AddItem(a,5)
end

local function release(p,c)
	p.Anchored=false p.CanCollide=true
	local away=p.Position-c local d=away.Magnitude
	local dir=d>.01 and away.Unit or cam.CFrame.LookVector
	p.AssemblyLinearVelocity=dir*C.Imp*power*math.clamp(1-d/C.R,.25,1)+cam.CFrame.LookVector*25+V3(0,12+math.random()*10,0)
	p.AssemblyAngularVelocity=V3(math.random()-.5,math.random()-.5,math.random()-.5)*25


Comments

0
Log in to join the conversation. Login
No comments yet. Be the first!

More universal scripts

See all