ADVERTISEMENTREMOVE ADS
knife script
46,766 views
Universal script•
4 months ago

Script Preview
Description
this is an universal knife script. press left click to launch the knife. hiting someone will make them fling by making the knife launcher goes into their torso at all time and spins at almost all directions to make the victim flunged, if missed and collides with an part, it will be stuck there and you gota go there into the knife to grab it. (not an tool)
ADVERTISEMENTREMOVE ADS
251 Lines • 7.67 KiB
-- [ Watermark GUI ]
local Players = game:GetService("Players")
local player = Players.LocalPlayer
local PlayerGui = player:WaitForChild("PlayerGui")
local screenGui = Instance.new("ScreenGui")
screenGui.Name = "WatermarkGui"
screenGui.ResetOnSpawn = false
screenGui.IgnoreGuiInset = true
screenGui.ZIndexBehavior = Enum.ZIndexBehavior.Global
screenGui.Parent = PlayerGui
local label = Instance.new("TextLabel")
label.Size = UDim2.new(0.6, 0, 0.1, 0)
label.Position = UDim2.new(0.2, 0, 0.45, 0)
label.BackgroundTransparency = 1
label.Text = "Made by whatanwaza"
label.Font = Enum.Font.GothamBlack
label.TextScaled = true
label.TextColor3 = Color3.new(1, 1, 1)
label.TextStrokeTransparency = 0.5
label.TextTransparency = 0
label.ZIndex = 999999
label.Parent = screenGui
task.wait(3)
for i = 0, 1, 0.03 do
label.TextTransparency = i
label.TextStrokeTransparency = 0.5 + (i * 0.5)
task.wait(0.03)
end
screenGui:Destroy()
-- [ Knife Script ]
local RunService = game:GetService("RunService")
local char = player.Character or player.CharacterAdded:Wait()
local rightArm = char:WaitForChild("Right Arm")
local mouse = player:GetMouse()
-- Create knife parts
local knife = Instance.new("Model")
knife.Name = "Knife"
local handle = Instance.new("Part")
handle.Name = "Handle"
handle.Size = Vector3.new(0.2, 0.6, 0.2)
handle.BrickColor = BrickColor.new("Really black")
handle.Material = Enum.Material.Metal
handle.CanCollide = false
handle.Massless = true
handle.Parent = knife
local blade = Instance.new("Part")
blade.Name = "Blade"
blade.Size = Vector3.new(0.1, 0.8, 0.05)
blade.BrickColor = BrickColor.new("Medium stone grey")
blade.Material = Enum.Material.Metal
blade.CanCollide = false
blade.Massless = true
blade.Parent = knife
local guard = Instance.new("Part")
guard.Name = "Guard"
guard.Size = Vector3.new(0.4, 0.1, 0.1)
guard.BrickColor = BrickColor.new("Dark stone grey")
guard.Material = Enum.Material.Metal
guard.CanCollide = false
guard.Massless = true
guard.Parent = knife
blade.CFrame = handle.CFrame * CFrame.new(0, 0.7, 0)
guard.CFrame = handle.CFrame * CFrame.new(0, 0, 0)
local function weldParts(part1, part2)
local weld = Instance.new("WeldConstraint")
weld.Part0 = part1
weld.Part1 = part2
weld.Parent = part1
end
weldParts(handle, blade)
weldParts(handle, guard)
knife.Parent = workspace
knife.PrimaryPart = handle
local function attachKnifeToArm()
local weld = rightArm:FindFirstChild("KnifeWeld")
if weld then weld:Destroy() end
knife.Parent = char
knife.PrimaryPart = handle
local weld = Instance.new("Weld")
weld.Name = "KnifeWeld"
weld.Part0 = rightArm
weld.Part1 = handle
weld.C0 = CFrame.new(0, -0.5, -0.3) * CFrame.Angles(math.rad(-90), math.rad(180), 0)
weld.Parent = rightArm
for _, part in pairs(knife:GetChildren()) do
if part:IsA("BasePart") then
part.CanCollide = false
part.Anchored = false
end
end
end
attachKnifeToArm()
local launched = false
local launchSpeed = 60
local originalCFrame
local flingConnection
local flingVictimAngularVelocity
local function spinAndFlingInsideTorso(rootPart, victimHumanoidRootPart)
local spinSpeedY = 9000
local spinSpeedX = 9000
local startTime = tick()
flingVictimAngularVelocity = Instance.new("BodyAngularVelocity")
flingVictimAngularVelocity.MaxTorque = Vector3.new(1e6, 1e6, 1e6)
flingVictimAngularVelocity.AngularVelocity = Vector3.new(50, 50, 50)
flingVictimAngularVelocity.Parent = victimHumanoidRootPart
flingConnection = RunService.Heartbeat:Connect(function()
if not rootPart or not rootPart.Parent or not victimHumanoidRootPart or not victimHumanoidRootPart.Parent then
flingConnection:Disconnect()
flingVictimAngularVelocity:Destroy()
flingConnection, flingVictimAngularVelocity = nil, nil
return
end
local elapsed = tick() - startTime
local spinY = CFrame.Angles(0, elapsed * spinSpeedY, 0)
local spinX = CFrame.Angles(elapsed * spinSpeedX, 0, 0)
rootPart.CFrame = victimHumanoidRootPart.CFrame * (spinY * spinX)
end)
end
local function stopSpinAndFling()
if flingConnection then flingConnection:Disconnect() end
if flingVictimAngularVelocity then flingVictimAngularVelocity:Destroy() end
flingConnection, flingVictimAngularVelocity = nil, nil
end
local function detachKnife()
local weld = rightArm:FindFirstChild("KnifeWeld")
if weld then weld:Destroy() end
knife.Parent = workspace
end
local function launchKnife()
if launched then return end
launched = true
detachKnife()
local origin = handle.Position
local targetPos = mouse.Hit.p
local direction = (targetPos - origin).Unit
handle.CFrame = CFrame.new(origin, origin + direction)
for _, part in pairs(knife:GetChildren()) do
if part:IsA("BasePart") then
part.CanCollide = true
part.Anchored = false
end
end
originalCFrame = char.PrimaryPart and char.PrimaryPart.CFrame or nil
local bodyVelocity = Instance.new("BodyVelocity")
bodyVelocity.MaxForce = Vector3.new(1e5, 1e5, 1e5)
bodyVelocity.Velocity = direction * launchSpeed
bodyVelocity.Parent = handle
local bodyAngularVelocity = Instance.new("BodyAngularVelocity")
bodyAngularVelocity.MaxTorque = Vector3.new(1e5, 1e5, 1e5)
bodyAngularVelocity.AngularVelocity = handle.CFrame.RightVector * 60
bodyAngularVelocity.Parent = handle
local connection
connection = handle.Touched:Connect(function(hit)
if not launched or not hit or not hit.Parent then return end
if hit:IsDescendantOf(char) or hit:IsDescendantOf(knife) then return end
bodyVelocity:Destroy()
bodyAngularVelocity:Destroy()
for _, part in pairs(knife:GetChildren()) do
part.Anchored = true
part.CanCollide = true
end
connection:Disconnect()
local hitHumanoid = hit.Parent:FindFirstChildOfClass("Humanoid")
local hitTorso = hit.Parent:FindFirstChild("Torso") or hit.Parent:FindFirstChild("UpperTorso")
if hitHumanoid and hitTorso then
for _, part in pairs(knife:GetChildren()) do
part.Transparency = 1
end
local rootPart = char:FindFirstChild("HumanoidRootPart")
local victimRoot = hit.Parent:FindFirstChild("HumanoidRootPart")
if rootPart and victimRoot then
rootPart.Anchored = false
spinAndFlingInsideTorso(rootPart, victimRoot)
end
wait(4.5)
stopSpinAndFling()
if rootPart and originalCFrame then
rootPart.CFrame = originalCFrame
end
for _, part in pairs(knife:GetChildren()) do
part.Transparency = 0
end
attachKnifeToArm()
launched = false
else
local pickupConnection
pickupConnection = handle.Touched:Connect(function(toucher)
if toucher.Parent == char then
pickupConnection:Disconnect()
for _, part in pairs(knife:GetChildren()) do
part.Anchored = false
part.CanCollide = false
end
attachKnifeToArm()
launched = false
end
end)
end
end)
end
mouse.Button1Down:Connect(function()
if not launched then
launchKnife()
end
end)
ADVERTISEMENTREMOVE ADS
ADVERTISEMENTREMOVE ADS







Comments
cute knife
@HannaeAltae you make good scripts but it has been a while since you made any new ones Please make more scripts. Thank you
thank you very munch
Doesn't work
@Jurex13gaming Nevermind it works i just didnt saw Lol
why it does not work?
oh its ok.