Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Converted with ttyyuu12345's model to script plugin v4
- function 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
- cors = {}
- mas = Instance.new("Model",game:GetService("Lighting"))
- Tool0 = Instance.new("Tool")
- Script1 = Instance.new("Script")
- Part2 = Instance.new("Part")
- SpecialMesh3 = Instance.new("SpecialMesh")
- Sound4 = Instance.new("Sound")
- Sound5 = Instance.new("Sound")
- Sound6 = Instance.new("Sound")
- Fire7 = Instance.new("Fire")
- LocalScript8 = Instance.new("LocalScript")
- Tool0.Name = "Joel's Flaming Super Death Sword"
- Tool0.Parent = mas
- Tool0.TextureId = "http://www.roblox.com/asset/?id=11444089"
- Tool0.GripForward = Vector3.new(-1, -0, -0)
- Tool0.GripPos = Vector3.new(0, 0, -1.70000005)
- Tool0.GripRight = Vector3.new(0, 1, 0)
- Tool0.GripUp = Vector3.new(0, 0, 1)
- Tool0.ToolTip = "Joel? Have you been downloading viruses again?"
- Script1.Name = "SwordScript"
- Script1.Parent = Tool0
- table.insert(cors,sandbox(Script1,function()
- --Stickmasterluke
- sp=script.Parent
- r=game:service("RunService")
- debris=game:GetService("Debris")
- basedamage=0
- fulldamage=15
- lastattack=0
- function waitfor(parent,name)
- while true do
- local child=parent:FindFirstChild(name)
- if child~=nil then
- return child
- end
- wait()
- end
- end
- UnsheathSound=waitfor(sp.Handle,"GrowlSound1")
- waitfor(sp,"RunAnim")
- function blow(hit,claw)
- if hit.Parent~=nil and claw~=nil then
- local humanoid=hit.Parent:findFirstChild("Humanoid")
- local vCharacter=sp.Parent
- if vCharacter~=nil and humanoid then
- local vPlayer=game.Players:playerFromCharacter(vCharacter)
- if vPlayer~=nil then
- local hum=vCharacter:findFirstChild("Humanoid")
- if hum~=nil and humanoid~=hum and hum.Health>0 then
- local right_arm=vCharacter:FindFirstChild("Right Arm")
- if right_arm~=nil then
- local joint=right_arm:FindFirstChild("RightGrip")
- if joint~=nil and (joint.Part0==sp.Handle or joint.Part1==sp.Handle) then
- tagHumanoid(humanoid,vPlayer)
- if tick()-lastattack<=1 then
- humanoid:TakeDamage(fulldamage)
- else
- humanoid:TakeDamage(basedamage)
- end
- end
- end
- end
- end
- end
- end
- end
- function tagHumanoid(humanoid,player)
- for i,v in ipairs(humanoid:GetChildren()) do
- if v.Name=="creator" then
- v:remove()
- end
- end
- local creator_tag=Instance.new("ObjectValue")
- creator_tag.Value=player
- creator_tag.Name="creator"
- creator_tag.Parent=humanoid
- debris:AddItem(creator_tag,1)
- end
- sp.Enabled=true
- function onActivated()
- local h=sp.Parent:FindFirstChild("Humanoid")
- if h~=nil and h.Health>0 and sp.Enabled then
- sp.Enabled=false
- sp.RunAnim.Value=not sp.RunAnim.Value
- lastattack=tick()
- local sound=sp.Handle:FindFirstChild("GrowlSound"..tostring(math.random(1,2)))
- if sound then
- sound.Pitch=.75+(math.random()*.5)
- sound:Play()
- end
- h.WalkSpeed=30
- wait(.75)
- if h~=nil then
- h.WalkSpeed=18
- end
- wait(.25)
- if h~=nil then
- h.WalkSpeed=16
- end
- sp.Enabled=true
- end
- end
- function onEquipped()
- UnsheathSound:play()
- delay(0,function()
- if lefthand~=nil then
- lefthand:remove()
- lefthand=nil
- end
- for i,v in ipairs(sp:GetChildren()) do
- if v~=nil and v.Name=="Effect" and v~=leftarm then
- v:remove()
- end
- end
- local leftarm=sp.Parent:FindFirstChild("Left Arm")
- if leftarm~=nil then
- lefthand=sp.Handle:clone()
- local mesh=lefthand:FindFirstChild("Mesh")
- for i,v in ipairs(lefthand:GetChildren()) do
- if v.className~="SpecialMesh" then
- v:remove()
- end
- end
- lefthand.Name="Effect"
- lefthand.CanCollide=false
- local w=Instance.new("Weld")
- w.Part0=leftarm
- w.Part1=lefthand
- w.C0=CFrame.new(-.2,-1.4,0)*CFrame.Angles(-math.pi/2,0,math.pi/2)
- w.Parent=lefthand
- lefthand.Touched:connect(function(hit)
- blow(hit,lefthand)
- end)
- lefthand.Parent=sp
- end
- end)
- end
- function onUnequipped()
- delay(0,function()
- if lefthand~=nil then
- lefthand:remove()
- lefthand=nil
- end
- end)
- end
- sp.Activated:connect(onActivated)
- sp.Equipped:connect(onEquipped)
- sp.Unequipped:connect(onUnequipped)
- connection=sp.Handle.Touched:connect(function(hit)
- blow(hit,sp.Handle)
- end)
- --Made by Stickmasterluke
- local sp=script.Parent
- swingspeed=1
- debris=game:GetService("Debris")
- enabled=true
- function waitfor(parent,name)
- while true do
- local child=parent:FindFirstChild(name)
- if child~=nil then
- return child
- end
- wait()
- end
- end
- waitfor(sp,"Handle")
- function onButton1Down(mouse)
- if not enabled then
- return
- end
- enabled=false
- mouse.Icon="rbxasset://textures\\GunWaitCursor.png"
- wait(.75)
- mouse.Icon="rbxasset://textures\\GunCursor.png"
- enabled=true
- end
- sp.Equipped:connect(function(mouse)
- equipped=true
- local currentlast=lastequipped
- if mouse==nil then
- print("Mouse not found")
- return
- end
- mouse.Icon="rbxasset://textures\\GunCursor.png"
- mouse.Button1Down:connect(function()
- onButton1Down(mouse)
- end)
- mouse.KeyDown:connect(function(key)
- key=string.lower(key)
- if key=="l" or key=="t" or key=="g" then
- local h=sp.Parent:FindFirstChild("Humanoid")
- if h~=nil then
- end
- end
- end)
- end)
- sp.Unequipped:connect(function()
- equipped=false
- end)
- function lunge()
- local t=sp.Parent:FindFirstChild("Torso")
- local h=sp.Parent:FindFirstChild("Humanoid")
- if t and h and equipped then
- local target=h.TargetPoint
- local direction=(target-t.Position)*Vector3.new(1,0,1)
- if direction.magnitude>.01 then
- direction=direction.unit
- local newBV=Instance.new("BodyVelocity")
- newBV.P=10^5
- newBV.maxForce=Vector3.new(newBV.P,0,newBV.P)
- newBV.velocity=direction*30
- debris:AddItem(newBV,1)
- newBV.Parent=t
- t.CFrame=CFrame.new(t.Position,target*Vector3.new(1,0,1)+Vector3.new(0,t.Position.Y,0))
- local sound=sp.Handle:FindFirstChild("FlashSound")
- if sound then
- sound:Play()
- end
- wait(.15)
- if newBV~=nil then
- newBV:remove()
- end
- end
- end
- end
- waitfor(sp,"RunAnim")
- sp.RunAnim.Changed:connect(function()
- local h=sp.Parent:FindFirstChild("Humanoid")
- local t=sp.Parent:FindFirstChild("Torso")
- local anim=sp:FindFirstChild("ClawAttack")
- if anim and t and h then
- theanim=h:LoadAnimation(anim)
- if theanim and h.Health>0 then
- theanim:Play(nil,nil,1/swingspeed)
- --lunge()
- end
- end
- end)
- function tagHumanoid(humanoid,player)
- for i,v in ipairs(humanoid:GetChildren()) do
- if v.Name=="creator" then
- v:remove()
- end
- end
- local creator_tag=Instance.new("ObjectValue")
- creator_tag.Value=player
- creator_tag.Name="creator"
- creator_tag.Parent=humanoid
- debris:AddItem(creator_tag,1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement