Pastebin
API
tools
faq
paste
Login
Sign up
Please fix the following errors:
New Paste
Syntax Highlighting
local plr = owner local char = plr.Character local hum = char:FindFirstChildOfClass("Humanoid") local torso = char:FindFirstChild("Torso") or char:FindFirstChild("HumanoidRootPart") local head = char:FindFirstChild("Head") if hum.RigType ~= Enum.HumanoidRigType.R6 then warn("Must be R6 rig to run this script.") return end local tool = Instance.new("Tool") local handle = Instance.new("Part") local SpecialMesh2 = Instance.new("SpecialMesh") tool.Name = "AlmightyToast's Sword" tool.Parent = plr.Backpack tool.TextureId = 'rbxassetid:/4911466046' handle.Name = "Handle" handle.Parent = tool handle.Size = Vector3.new(3.1400001, 0.195999995, 3.1400001) handle.BottomSurface = Enum.SurfaceType.Smooth handle.CanCollide = false handle.TopSurface = Enum.SurfaceType.Smooth SpecialMesh2.Parent = handle SpecialMesh2.MeshId = "rbxassetid://3676810102" SpecialMesh2.Scale = Vector3.new(0.200000003, 0.200000003, 0.200000003) SpecialMesh2.TextureId = "rbxassetid://3676810220" SpecialMesh2.MeshType = Enum.MeshType.FileMesh for i,v in pairs(tool:GetChildren()) do if v:IsA("Part") then v.Massless = true v.Locked = true v.Anchored = false v.CanCollide = false if v ~= handle then local weld = Instance.new("Weld") weld.Part0 = handle weld.Part1 = v weld.C0 = handle.CFrame:Inverse() weld.C1 = v.CFrame:Inverse() weld.Parent = v else v.CanCollide = true end end end tool.Parent = char local debris = game:GetService("Debris") local tween = game:GetService("TweenService") local meta = { tier = 1, sharpness = -3, knockback = 0, } local using = false local equipped = false local holding = false local stamina = 100 local dmg = 15 + (5 * meta.tier) + (5 * meta.sharpness) local kb = 25 + (5 * meta.knockback) local block_reduce = 0.7 local ls = nil local blocking = false local combat_18 = true local first_person = true local hurt_fx = false local can_w_tap = false if combat_18 then speed = 0 else speed = 0.12 end local grips = { swing = CFrame.new(-1.12343681, 7.46069873e-14, 0.865265131, -2.96722469e-08, 0.678822041, -0.734302819, -1, -4.37113883e-08, 0, -3.20973932e-08, 0.734302819, 0.678822041), block = CFrame.new(-0.825168073, -0.020077154, 1.00834012, -0.275093406, 0.960726619, -0.0364401713, -0.146487176, -0.0044247508, 0.989202619, 0.950192153, 0.277461171, 0.141951352), hold = CFrame.new(-1.10684741, 4.97379915e-14, 0.99055028, -3.20973932e-08, 0.734302819, 0.6788221, -1, -4.37113883e-08, 0, 2.96722487e-08, -0.6788221, 0.734302819), } tool.Grip = grips.hold warn([[ - Made by KrYn0MoRe - W-tap for extra knockback - Hold R-Click to block 70% damage - Hold Left Control makes you sprint ]]) hum.JumpPower = 30 local hscript = char:FindFirstChild("Health") if hscript then hscript:Destroy() end local ttip = tool.Name ttip = ttip .. '\n' for enchant,lvl in pairs(meta) do --if lvl ~= 0 then ttip = ttip .. '\n' ttip = ttip .. enchant .. ' ' .. lvl --end end ttip = ttip .. '\n' ttip = ttip .. '\n' .. 'When in main hand:' ttip = ttip .. '\n' ttip = ttip .. '\n' .. speed .. ' Attack Speed' ttip = ttip .. '\n' .. dmg .. ' Attack Damage' print(ttip) tool.ToolTip = ttip local aid = 0 function add_aid() aid = aid + 1 return aid end function check_aid(cid) if aid == cid then return true end end local walkremote = Instance.new("RemoteEvent") walkremote.Parent = tool walkremote.OnServerEvent:Connect(function(plr,mode,data) if mode == 1 then can_w_tap = data end end) NLS([[ player = game:GetService("Players").LocalPlayer mouse = player:GetMouse() char = player.Character hum = char:FindFirstChildOfClass("Humanoid") local walkremote = script.Parent local oldspeed = hum.WalkSpeed local eating = false local running = false mouse.KeyDown:Connect(function(key) if string.byte(key) == 50 then running = true if not eating then hum.WalkSpeed = 24 walkremote:FireServer(1,true) end end end) mouse.KeyUp:Connect(function(key) if string.byte(key) == 50 then running = false if not eating then hum.WalkSpeed = oldspeed walkremote:FireServer(1,false) end end if key == 'w' and hum.WalkSpeed == 24 then walkremote:FireServer(1,true) end end) walkremote.OnClientEvent:Connect(function(mode,data) if mode == 1 then if data == true then eating = true hum.WalkSpeed = 10 if running then walkremote:FireServer(1,false) end elseif data == false then eating = false if running then hum.WalkSpeed = 24 walkremote:FireServer(1,true) elseif not running then hum.WalkSpeed = oldspeed walkremote:FireServer(2,false) walkremote:FireServer(1,false) end end end end) ]],walkremote) local effects = {} function effects.sandbox(var,func) local env = getfenv(func) local newenv = setmetatable({},{ __index = function(self,k) if k=="script" then return var else return env[k] end end, }) setfenv(func,newenv) return func end local hitsound2 = Instance.new("Sound") hitsound2.SoundId = 'rbxassetid://3362346832' hitsound2.Volume = 1.5 hitsound2.Parent = handle local critsound = Instance.new("Sound") critsound.SoundId = 'rbxassetid://4801410586' critsound.Volume = 1.5 critsound.Parent = handle function effects.effect(par,tarhum,weld,damage,targtorso,crit) if not combat_18 then local confirm = Instance.new("IntValue",par) confirm.Name = plr.Name .. 'swordhit' confirm.Parent = par debris:AddItem(confirm,0.12) end tarhum:TakeDamage(damage) if not hitsound2 then hitsound2 = Instance.new("Sound") hitsound2.SoundId = 'rbxassetid://3362346832' hitsound2.Volume = 1.5 hitsound2.Parent = handle end if not critsound then critsound = Instance.new("Sound") critsound.SoundId = 'rbxassetid://4801410586' critsound.Volume = 1.5 critsound.Parent = handle end if math.random(1,2) == 1 and crit then critsound.SoundId = 'rbxassetid://4801410586' elseif math.random(1,2) == 2 and crit then critsound.SoundId = 'rbxassetid://4801410149' elseif math.random(1,2) == 1 then hitsound2.SoundId = 'rbxassetid://3362346832' else hitsound2.SoundId = 'rbxassetid://3362337129' end if crit then critsound:Play() else hitsound2:Play() end --[[ spawn(function() repeat wait() until not hitsound2.IsPlaying hitsound2.Parent = nil end) ]] spawn(function() local _kb = kb if can_w_tap then can_w_tap = false _kb = _kb*1.5 end local dir = (targtorso.Position-torso.Position).Unit local b = Instance.new("BodyVelocity") b.MaxForce = Vector3.new(math.huge,math.huge,math.huge) b.Velocity = Vector3.new(0,9,0) + (dir*_kb*2.25) targtorso.Velocity = targtorso.Velocity + Vector3.new(0,10,0) + (torso.CFrame.LookVector*_kb) b.Parent = targtorso debris:AddItem(b,0.1) end) if hurt_fx then for i,v in pairs(par:GetChildren()) do if v:IsA("BasePart") and v.Name ~= "HumanoidRootPart" and not v:IsDescendantOf(char) and not v.Parent:IsA("Tool") and v.Name ~= "fallblock" then local weld = Instance.new("Weld") local part = v:Clone() part.CanCollide = false part.Massless = true part.Anchored = false for i,n in pairs(part:GetDescendants()) do if not n:IsA("SpecialMesh") then n:Destroy() end if n:IsA("SpecialMesh") then n.TextureId = "" n.Scale = n.Scale * 1.001 end end weld.Part0 = part weld.Part1 = v weld.Parent = part part.BrickColor = BrickColor.new("Really red") part.Size = v.Size * 1.001 part.Material = Enum.Material.SmoothPlastic part.CFrame = v.CFrame part.Parent = v.Parent part.Name = "hurtcolor" if 0.6 >= v.Transparency then part.Transparency = 0.6 end if v.Transparency > 0.6 then part.Transparency = v.Transparency*1.5 end part.CanCollide = false game:GetService("Debris"):AddItem(part,0.1) end end end end local stamina = 100 local function recharge() if 100 > stamina then stamina = stamina + 10 end if stamina > 100 then stamina = 100 end end spawn(function() while wait(0.06) do wait(0.06) recharge() end end) local isFalling = false hum.StateChanged:Connect(function(old,new) if new == Enum.HumanoidStateType.Landed then isFalling = false elseif new == Enum.HumanoidStateType.Running then isFalling = false elseif new == Enum.HumanoidStateType.RunningNoPhysics then isFalling = false elseif new == Enum.HumanoidStateType.Jumping then isFalling = true elseif new == Enum.HumanoidStateType.FallingDown then isFalling = true elseif new == Enum.HumanoidStateType.Freefall then isFalling = true elseif new == Enum.HumanoidStateType.Climbing then isFalling = false end end) local hitanimid = 0 local function hit(target,close) local cid = add_aid() spawn(function() hitanimid = 1 if hitanimid == 1 and check_aid(cid) then else return end tween:Create(tool,TweenInfo.new(0.12),{Grip = grips.swing}):Play() hitanimid = 2 wait(0.08) if hitanimid == 2 and check_aid(cid) then else return end tween:Create(tool,TweenInfo.new(0.12),{Grip = grips.block}):Play() hitanimid = 3 wait(0.04) if hitanimid == 3 and check_aid(cid) then else return end tween:Create(tool,TweenInfo.new(0.12),{Grip = grips.hold}):Play() end) if (combat_18 or (stamina > 30 and not combat_18)) and ((target and close) or not first_person) then else return end local temp_dmg = 0 local crit = false if combat_18 then temp_dmg = dmg else if isFalling then temp_dmg = (dmg*1.57142857) crit = true elseif stamina > 30 then temp_dmg = dmg end stamina = 0 end local connection if not first_person then connection = handle.Touched:Connect(function(obj) local targchar,targtorso,targhum pcall(function() targchar = obj.Parent end) pcall(function() targtorso = targchar:FindFirstChild("Torso") or targchar:FindFirstChild("HumanoidRootPart") end) pcall(function() targhum = targchar:FindFirstChildOfClass("Humanoid") end) if targchar and targchar ~= char and targtorso and targhum then if targhum ~= nil then if targhum.Parent then if not targhum.Parent:FindFirstChild(plr.Name .. "swordhit 32k") and obj.Parent:IsA("Model") and targhum.Health > 0 then effects.effect(targhum.Parent,targhum,targchar.PrimaryPart or targtorso,temp_dmg,targtorso,crit) end end end end end) elseif first_person then local targchar,targtorso,targhum for i,v in pairs(workspace:GetChildren()) do if target:IsDescendantOf(v) then targchar = v end end --[[ pcall(function() targchar = target.Parent end) ]] pcall(function() targtorso = targchar:FindFirstChild("Torso") or targchar:FindFirstChild("HumanoidRootPart") end) pcall(function() targhum = targchar:FindFirstChildOfClass("Humanoid") end) if target and targchar and targchar ~= char and targtorso and targhum then if targhum ~= nil then if targhum.Parent then if not targhum.Parent:FindFirstChild(plr.Name .. "swordhit 32k") and targchar:IsA("Model") and targhum.Health > 0 then effects.effect(targhum.Parent,targhum,targchar.PrimaryPart,temp_dmg,targtorso,crit) end end end end end if not combat_18 then wait(0.12) end if connection then spawn(function() wait(0.1) connection:Disconnect() end) end end local function CheckIfAlive() local alive = false; if (plr and plr.Parent and char and char.Parent and hum and hum.Parent and hum.Health > 0 and torso and torso.Parent and head and head.Parent) then alive = true; end; return alive; end; tool.Equipped:Connect(function() char = tool.Parent; plr = game:GetService("Players"):GetPlayerFromCharacter(char); hum = char:FindFirstChildOfClass("Humanoid"); torso = char:FindFirstChild("Torso") or char:FindFirstChild("HumanoidRootPart"); head = char:FindFirstChild("Head"); if not CheckIfAlive() then tool.Parent = nil return end; equipped = true end) tool.Unequipped:Connect(function() if 0 >= hum.Health then tool:Destroy() end tween:Create(tool,TweenInfo.new(0),{Grip = grips.hold}):Play() blocking = false equipped = false end) local mouseremote = Instance.new("RemoteEvent") mouseremote.Parent = tool NLS([[ workspace.Camera.FieldOfView = 90 local plr = game:GetService("Players").LocalPlayer local char = plr.Character local torso = char:FindFirstChild("Torso") or char:FindFirstChild("HumanoidRootPart") local hum = char:FindFirstChildOfClass("Humanoid") local mouse = plr:GetMouse() local remote = script.Parent mouse.TargetFilter = char plr.CameraMode = Enum.CameraMode.LockFirstPerson mouse.Button1Down:Connect(function() local target = mouse.Target local mag = nil local close = false if target and torso then mag = (torso.Position - target.Position).magnitude end if mag and 9 >= mag then close = true end remote:FireServer(1,target,close) end) mouse.Button2Down:Connect(function() remote:FireServer(2,true) end) mouse.Button2Up:Connect(function() remote:FireServer(2,false) end) ]],mouseremote) local curhealth = hum.Health hum.HealthChanged:Connect(function(newhealth) if curhealth > newhealth and newhealth > 0 then if blocking then local dmg = curhealth-newhealth local heal = dmg*block_reduce curhealth = hum.Health + heal hum.Health += heal end end curhealth = hum.Health end) mouseremote.OnServerEvent:Connect(function(plr,mode,data,data2) if mode == 1 and equipped and not using and not blocking then using = true hit(data,data2) using = false end if mode == 2 then add_aid() if data then blocking = true tween:Create(tool,TweenInfo.new(0),{Grip = grips.block}):Play() elseif not data then blocking = false tween:Create(tool,TweenInfo.new(0),{Grip = grips.hold}):Play() end end end)
Optional Paste Settings
Category:
None
Cryptocurrency
Cybersecurity
Fixit
Food
Gaming
Haiku
Help
History
Housing
Jokes
Legal
Money
Movies
Music
Pets
Photo
Science
Software
Source Code
Spirit
Sports
Travel
TV
Writing
Tags:
Syntax Highlighting:
None
Bash
C
C#
C++
CSS
HTML
JSON
Java
JavaScript
Lua
Markdown (PRO members only)
Objective C
PHP
Perl
Python
Ruby
Swift
4CS
6502 ACME Cross Assembler
6502 Kick Assembler
6502 TASM/64TASS
ABAP
AIMMS
ALGOL 68
APT Sources
ARM
ASM (NASM)
ASP
ActionScript
ActionScript 3
Ada
Apache Log
AppleScript
Arduino
Asymptote
AutoIt
Autohotkey
Avisynth
Awk
BASCOM AVR
BNF
BOO
Bash
Basic4GL
Batch
BibTeX
Blitz Basic
Blitz3D
BlitzMax
BrainFuck
C
C (WinAPI)
C Intermediate Language
C for Macs
C#
C++
C++ (WinAPI)
C++ (with Qt extensions)
C: Loadrunner
CAD DCL
CAD Lisp
CFDG
CMake
COBOL
CSS
Ceylon
ChaiScript
Chapel
Clojure
Clone C
Clone C++
CoffeeScript
ColdFusion
Cuesheet
D
DCL
DCPU-16
DCS
DIV
DOT
Dart
Delphi
Delphi Prism (Oxygene)
Diff
E
ECMAScript
EPC
Easytrieve
Eiffel
Email
Erlang
Euphoria
F#
FO Language
Falcon
Filemaker
Formula One
Fortran
FreeBasic
FreeSWITCH
GAMBAS
GDB
GDScript
Game Maker
Genero
Genie
GetText
Go
Godot GLSL
Groovy
GwBasic
HQ9 Plus
HTML
HTML 5
Haskell
Haxe
HicEst
IDL
INI file
INTERCAL
IO
ISPF Panel Definition
Icon
Inno Script
J
JCL
JSON
Java
Java 5
JavaScript
Julia
KSP (Kontakt Script)
KiXtart
Kotlin
LDIF
LLVM
LOL Code
LScript
Latex
Liberty BASIC
Linden Scripting
Lisp
Loco Basic
Logtalk
Lotus Formulas
Lotus Script
Lua
M68000 Assembler
MIX Assembler
MK-61/52
MPASM
MXML
MagikSF
Make
MapBasic
Markdown (PRO members only)
MatLab
Mercury
MetaPost
Modula 2
Modula 3
Motorola 68000 HiSoft Dev
MySQL
Nagios
NetRexx
Nginx
Nim
NullSoft Installer
OCaml
OCaml Brief
Oberon 2
Objeck Programming Langua
Objective C
Octave
Open Object Rexx
OpenBSD PACKET FILTER
OpenGL Shading
Openoffice BASIC
Oracle 11
Oracle 8
Oz
PARI/GP
PCRE
PHP
PHP Brief
PL/I
PL/SQL
POV-Ray
ParaSail
Pascal
Pawn
Per
Perl
Perl 6
Phix
Pic 16
Pike
Pixel Bender
PostScript
PostgreSQL
PowerBuilder
PowerShell
ProFTPd
Progress
Prolog
Properties
ProvideX
Puppet
PureBasic
PyCon
Python
Python for S60
QBasic
QML
R
RBScript
REBOL
REG
RPM Spec
Racket
Rails
Rexx
Robots
Roff Manpage
Ruby
Ruby Gnuplot
Rust
SAS
SCL
SPARK
SPARQL
SQF
SQL
SSH Config
Scala
Scheme
Scilab
SdlBasic
Smalltalk
Smarty
StandardML
StoneScript
SuperCollider
Swift
SystemVerilog
T-SQL
TCL
TeXgraph
Tera Term
TypeScript
TypoScript
UPC
Unicon
UnrealScript
Urbi
VB.NET
VBScript
VHDL
VIM
Vala
Vedit
VeriLog
Visual Pro Log
VisualBasic
VisualFoxPro
WHOIS
WhiteSpace
Winbatch
XBasic
XML
XPP
Xojo
Xorg Config
YAML
YARA
Z80 Assembler
ZXBasic
autoconf
jQuery
mIRC
newLISP
q/kdb+
thinBasic
Paste Expiration:
Never
Burn after read
10 Minutes
1 Hour
1 Day
1 Week
2 Weeks
1 Month
6 Months
1 Year
Paste Exposure:
Public
Unlisted
Private
Folder:
(members only)
Password
NEW
Enabled
Disabled
Burn after read
NEW
Paste Name / Title:
Create New Paste
Hello
Guest
Sign Up
or
Login
Sign in with Facebook
Sign in with Twitter
Sign in with Google
You are currently not logged in, this means you can not edit or delete anything you paste.
Sign Up
or
Login
Public Pastes
setups
4 hours ago | 0.16 KB
Untitled
4 hours ago | 0.36 KB
my-push Script
4 hours ago | 0.61 KB
cholibrium
1 day ago | 1.65 KB
SMB BIS - Dimble Woods - Virtual Piano
1 day ago | 3.15 KB
buscar-productos.blade.php
PHP | 2 days ago | 2.44 KB
simple youtube video to product
PHP | 2 days ago | 3.71 KB
OoT rando seed 6/1
2 days ago | 68.21 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the
Cookies Policy
.
OK, I Understand
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!