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")
- LocalScript1 = Instance.new("LocalScript")
- LocalScript2 = Instance.new("LocalScript")
- ScreenGui3 = Instance.new("ScreenGui")
- ImageLabel4 = Instance.new("ImageLabel")
- ImageLabel5 = Instance.new("ImageLabel")
- ImageLabel6 = Instance.new("ImageLabel")
- Script7 = Instance.new("Script")
- Part8 = Instance.new("Part")
- SpecialMesh9 = Instance.new("SpecialMesh")
- Sound10 = Instance.new("Sound")
- Part11 = Instance.new("Part")
- SpecialMesh12 = Instance.new("SpecialMesh")
- Part13 = Instance.new("Part")
- SpecialMesh14 = Instance.new("SpecialMesh")
- Script15 = Instance.new("Script")
- Script16 = Instance.new("Script")
- LocalScript17 = Instance.new("LocalScript")
- LocalScript18 = Instance.new("LocalScript")
- Tool0.Name = "Jarate"
- Tool0.Parent = mas
- Tool0.TextureId = "http://www.roblox.com/asset/?id=130784959"
- Tool0.ToolTip = "What is this? I THROW IT"
- Tool0.CanBeDropped = false
- LocalScript1.Name = "TurnHandler"
- LocalScript1.Parent = Tool0
- table.insert(cors,sandbox(LocalScript1,function()
- wait()
- Tool=script.Parent
- CP,Torso,g=nil,nil,nil
- necko=CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
- getPos=function(Pos,TorsoPos)
- return Vector3.new(Pos.x,TorsoPos.y,Pos.z)
- end
- Turn=function(mouse,Torso,Gyro)
- g.cframe=CFrame.new(Torso.Position,getPos(mouse.Hit.p,Torso.Position))
- offset=(Torso.Position.y-mouse.Hit.p.y)/100
- mag=(Torso.Position-mouse.Hit.p).magnitude/80
- offset=offset/mag
- neck=Torso.Neck
- neck.C0=necko*CFrame.fromEulerAnglesXYZ(offset,0,0)
- arm=Torso:FindFirstChild("Right Shoulder")
- if arm~=nil then
- --a=workspace.Player1.Torso["Right Shoulder"] a.C0=CFrame.new(1, 1, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)*CFrame.Angles(math.rad(40),0,math.rad(140))
- arm.C0=CFrame.new(1, 1, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)*CFrame.Angles(math.rad(40),0,math.rad(50)-offset)
- end
- end
- Equi=function(mouse)
- wait(.2)
- CP=Tool.Parent
- Torso=CP.Torso
- g=Instance.new("BodyGyro")
- g.P=18000
- g.D=600
- g.maxTorque=Vector3.new(80000,80000000,80000)*math.huge
- g.cframe=Torso.CFrame
- g.Parent=Torso
- while true do
- if Tool.Parent.className~="Model" then
- break
- end
- Turn(mouse,Torso,g)
- wait()
- end
- Torso.Neck.C0=necko
- g:Remove()
- end
- Tool.Equipped:connect(Equi)
- Tool.Unequipped:connect(function()
- neck.C0=necko
- arm.C0=CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
- end)
- end))
- LocalScript2.Name = "JarateHandler"
- LocalScript2.Parent = Tool0
- table.insert(cors,sandbox(LocalScript2,function()
- --Jarate, by Dakota99!
- --[[
- Instructions
- 1. Equip jarate
- 2. Throw jarate at enemies
- 3. Get 1.5x damage (configurable) on enemies
- ]]--
- Player=game:GetService("Players").LocalPlayer
- HitOwner=false --will jarate hit the owner?
- MaxWait=30 --reload time
- ThrowVel=200 --throw force
- MaxRange=50 --studs that jarate affects
- _G.Jarate={}
- _G.Jarate["Ready"]=true
- --Sounds! This was made on the day of the sound update, 9/25/13.
- do
- SoundPrefix="http://www.roblox.com/asset/?id="
- Sounds={}
- Sounds.Throw1=130778773
- Sounds.Throw2=130778782
- Sounds.Throw3=130778789
- Sounds.Break =130779009
- function soundPlay(ent,id)
- local Sound=Instance.new("Sound",ent)
- Sound.SoundId=SoundPrefix..id
- Sound.PlayOnRemove=true
- Sound.Volume=0.3
- Sound:remove()
- end
- for _,v in pairs(Sounds) do
- game:GetService("ContentProvider"):Preload(SoundPrefix..v)
- end
- end
- --Core Variables
- do
- Tool=script.Parent
- Handle=Tool.Handle
- Welds={
- ["Lid"]={
- CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
- CFrame.new(0, -0.4, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- },
- ["Urine"]={
- CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
- CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- }
- }
- end
- function setAlpha(n)
- for _,v in pairs(Tool:GetChildren()) do
- if v:IsA("BasePart") then
- v.Transparency=n
- if v.Name=="Handle" then
- if n~=0 then v.Transparency=n else v.Transparency=0.5 end
- end
- end
- end
- end
- --Jarate Core
- function markTargets(pos,range)
- local Humanoids={}
- function scan(a)
- if (not a:IsDescendantOf(Player.Character) or HitOwner) and a:IsA("Humanoid") and a.Torso and a.Torso:IsA("Part") then
- local Targ=a.Torso
- if (Targ.Position-pos).magnitude<range then
- if a:FindFirstChild("Jarate") then a.Jarate.Parent=nil end
- table.insert(Humanoids,a)
- end
- end
- for _,v in pairs(a:GetChildren()) do
- scan(v)
- end
- end
- scan(workspace)
- for _,v in pairs(Humanoids) do
- local New=script.Jarate:clone()
- New.Parent=v
- New.Disabled=false
- end
- end
- function ThrowJarate()
- local Mouse=Player:GetMouse()
- local AimDir=(Mouse.hit.p-Player.Character.Head.Position).unit
- local Projectile=Instance.new("Model")
- for _,v in pairs(Tool:GetChildren()) do
- if v:IsA("BasePart") then
- v:clone().Parent=Projectile
- end
- end
- for _,v in pairs(Projectile:GetChildren()) do
- for index,data in pairs(Welds) do
- if v.Name==index then
- local Weld=Instance.new("Weld",v)
- Weld.Part0=Projectile.Handle
- Weld.Part1=v
- Weld.C0=data[1]
- Weld.C1=data[2]
- end
- v.CanCollide=false
- v.Velocity=AimDir*ThrowVel
- v.RotVelocity=Vector3.new(math.random(-ThrowVel,ThrowVel),math.random(-ThrowVel,ThrowVel),math.random(-ThrowVel,ThrowVel))
- end
- end
- Projectile.Name="Projectile_Jarate"
- Projectile.Parent=workspace
- Projectile.Handle.CFrame=Handle.CFrame
- setAlpha(1)
- Projectile.Handle.Touched:connect(function(hit)
- if not hit:IsDescendantOf(Player.Character) then
- soundPlay(Projectile,Sounds.Break)
- markTargets(Projectile.Handle.Position,MaxRange)
- Projectile:remove()
- end
- end)
- end
- --Main handler function thing
- Tool.Activated:connect(function()
- if _G.Jarate["Ready"]==true then
- local getRandomSound=function() sounds={Sounds.Throw1,Sounds.Throw2,Sounds.Throw3} return sounds[math.random(1,#sounds)] end
- soundPlay(Player.Character.Head,getRandomSound())
- _G.Jarate["Ready"]=false
- ThrowJarate()
- CurrentWait=MaxWait
- end
- end)
- gui=script.AmmoGui
- Tool.Equipped:connect(function()
- gui.Parent=Player.PlayerGui
- end)
- Tool.Unequipped:connect(function()
- gui.Parent=script
- end)
- CurrentWait=0
- Ammo=script.AmmoGui.AmmoContainer.Background.Status
- while wait(1) do
- if CurrentWait>0 then
- CurrentWait=CurrentWait-1
- Ammo.BackgroundColor3=Color3.new(172/255,0,0)
- else _G.Jarate["Ready"]=true setAlpha(0) Ammo.BackgroundColor3=Color3.new(0,172/255,172/255) end
- Ammo.Size=UDim2.new(1-(CurrentWait/MaxWait),0,1,0)
- end
- end))
- ScreenGui3.Name = "AmmoGui"
- ScreenGui3.Parent = LocalScript2
- ImageLabel4.Name = "AmmoContainer"
- ImageLabel4.Parent = ScreenGui3
- ImageLabel4.Transparency = 1
- ImageLabel4.Size = UDim2.new(0.150000006, 0, 0.125, 0)
- ImageLabel4.Position = UDim2.new(0.850000024, 0, 0.875, 0)
- ImageLabel4.BackgroundColor3 = Color3.new(0, 0.67451, 0.67451)
- ImageLabel4.BackgroundTransparency = 1
- ImageLabel4.Image = "http://www.roblox.com/asset/?id=130137440"
- ImageLabel5.Name = "Background"
- ImageLabel5.Parent = ImageLabel4
- ImageLabel5.Size = UDim2.new(0.600000024, 0, 0.150000006, 0)
- ImageLabel5.Position = UDim2.new(0.200000003, 0, 0.5, 0)
- ImageLabel5.BackgroundColor3 = Color3.new(0.490196, 0.490196, 0.490196)
- ImageLabel5.BorderSizePixel = 0
- ImageLabel5.ZIndex = 2
- ImageLabel6.Name = "Status"
- ImageLabel6.Parent = ImageLabel5
- ImageLabel6.Size = UDim2.new(0.5, 0, 1, 0)
- ImageLabel6.BackgroundColor3 = Color3.new(1, 1, 1)
- ImageLabel6.BorderSizePixel = 0
- ImageLabel6.ZIndex = 3
- Script7.Name = "Jarate"
- Script7.Parent = LocalScript2
- Script7.Disabled = true
- table.insert(cors,sandbox(Script7,function()
- --This is the localscript that's dumped into other players' characters
- --when they get hit by jarate
- DamageMag=1.5 --default 1.5, sets how much more damage
- JarateTime=45 --jarate length
- Humanoid=script.Parent
- Connections={}
- Colors={}
- script.Changed:connect(function()
- if script.Parent~=Humanoid then
- for _,v in pairs(Connections) do
- v:disconnect()
- end
- end
- end)
- lasthealth=Humanoid.Health
- table.insert(Connections,
- Humanoid.HealthChanged:connect(function(health)
- print(health,lasthealth)
- if lasthealth~=math.floor(health) then
- local Damage=lasthealth-health
- if Damage>0 then
- lasthealth=math.floor(lasthealth-Damage*DamageMag)
- Humanoid.Health=lasthealth
- else
- lasthealth=math.floor(Humanoid.Health)
- end
- end
- end))
- function scan(a)
- if a:IsA("BasePart") then
- Colors[a]=a.Color
- a.Color=Color3.new(a.Color.r+128/255,a.Color.g+128/255,a.Color.b)
- table.insert(Connections,a.Changed:connect(function(prop)
- if prop=="Color" then
- Colors[a]=a.Color
- end
- end))
- end
- for _,v in pairs(a:GetChildren()) do
- scan(v)
- end
- end
- scan(Humanoid.Parent)
- wait(JarateTime)
- for ent,color in pairs(Colors) do
- ent.Color=color
- end
- script:remove()
- end))
- Part8.Name = "Handle"
- Part8.Parent = Tool0
- Part8.BrickColor = BrickColor.new("Pastel light blue")
- Part8.Transparency = 0.30000001192093
- Part8.Rotation = Vector3.new(180, 0, -180)
- Part8.FormFactor = Enum.FormFactor.Custom
- Part8.Size = Vector3.new(0.800000012, 1.10000074, 0.800000012)
- Part8.CFrame = CFrame.new(-20.4799995, 0.832017004, -34.0099983, -1, 0, -0, -0, 1, -0, -0, 0, -1)
- Part8.BottomSurface = Enum.SurfaceType.Smooth
- Part8.TopSurface = Enum.SurfaceType.Smooth
- Part8.Color = Color3.new(0.686275, 0.866667, 1)
- Part8.Position = Vector3.new(-20.4799995, 0.832017004, -34.0099983)
- Part8.Orientation = Vector3.new(0, -180, 0)
- Part8.Color = Color3.new(0.686275, 0.866667, 1)
- SpecialMesh9.Parent = Part8
- SpecialMesh9.MeshId = "http://www.roblox.com/asset/?id=115289510"
- SpecialMesh9.TextureId = "http://www.roblox.com/asset?id=115340918"
- SpecialMesh9.MeshType = Enum.MeshType.FileMesh
- Sound10.Name = "Throw"
- Sound10.Parent = Part8
- Sound10.SoundId = "http://www.roblox.com/asset/?id=130778789"
- Sound10.Volume = 1
- Part11.Name = "Lid"
- Part11.Parent = Tool0
- Part11.Material = Enum.Material.Foil
- Part11.Rotation = Vector3.new(180, 0, -180)
- Part11.CanCollide = false
- Part11.FormFactor = Enum.FormFactor.Custom
- Part11.Size = Vector3.new(0.800000012, 0.200000003, 0.800000012)
- Part11.CFrame = CFrame.new(-20.4799995, 1.43200696, -34.0099983, -1, 0, -0, -0, 1, -0, -0, 0, -1)
- Part11.BottomSurface = Enum.SurfaceType.Smooth
- Part11.TopSurface = Enum.SurfaceType.Smooth
- Part11.Position = Vector3.new(-20.4799995, 1.43200696, -34.0099983)
- Part11.Orientation = Vector3.new(0, -180, 0)
- SpecialMesh12.Parent = Part11
- SpecialMesh12.MeshId = "http://www.roblox.com/asset/?id=115296503"
- SpecialMesh12.TextureId = "http://www.roblox.com/asset?id=115340918"
- SpecialMesh12.MeshType = Enum.MeshType.FileMesh
- Part13.Name = "Urine"
- Part13.Parent = Tool0
- Part13.Material = Enum.Material.SmoothPlastic
- Part13.BrickColor = BrickColor.new("Bright yellow")
- Part13.Transparency = 0.30000001192093
- Part13.Anchored = true
- Part13.CanCollide = false
- Part13.FormFactor = Enum.FormFactor.Custom
- Part13.Size = Vector3.new(0.619999826, 1.14999998, 0.719999611)
- Part13.CFrame = CFrame.new(-20.4780006, 0.575016975, -34.0099983, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part13.BottomSurface = Enum.SurfaceType.Smooth
- Part13.TopSurface = Enum.SurfaceType.Smooth
- Part13.Color = Color3.new(0.960784, 0.803922, 0.188235)
- Part13.Position = Vector3.new(-20.4780006, 0.575016975, -34.0099983)
- Part13.Color = Color3.new(0.960784, 0.803922, 0.188235)
- SpecialMesh14.Parent = Part13
- SpecialMesh14.Scale = Vector3.new(1.5, 1, 1.10000002)
- SpecialMesh14.Scale = Vector3.new(1.5, 1, 1.10000002)
- Script15.Name = "Welding"
- Script15.Parent = Tool0
- table.insert(cors,sandbox(Script15,function()
- function Weld(x,y)
- local W = Instance.new("Weld")
- W.Part0 = x
- W.Part1 = y
- local CJ = CFrame.new(x.Position)
- local C0 = x.CFrame:inverse()*CJ
- local C1 = y.CFrame:inverse()*CJ
- W.C0 = C0
- W.C1 = C1
- W.Parent = x
- end
- function Get(A)
- if A.className == "Part" then
- Weld(script.Parent.Handle, A)
- A.Anchored = false
- else
- local C = A:GetChildren()
- for i=1, #C do
- Get(C[i])
- end
- end
- end
- function Finale()
- Get(script.Parent)
- end
- script.Parent.Equipped:connect(Finale)
- script.Parent.Unequipped:connect(Finale)
- Finale()
- end))
- Script16.Name = "Welding"
- Script16.Parent = Tool0
- table.insert(cors,sandbox(Script16,function()
- function Weld(x,y)
- local W = Instance.new("Weld")
- W.Part0 = x
- W.Part1 = y
- local CJ = CFrame.new(x.Position)
- local C0 = x.CFrame:inverse()*CJ
- local C1 = y.CFrame:inverse()*CJ
- W.C0 = C0
- W.C1 = C1
- W.Parent = x
- end
- function Get(A)
- if A.className == "Part" then
- Weld(script.Parent.Handle, A)
- A.Anchored = false
- else
- local C = A:GetChildren()
- for i=1, #C do
- Get(C[i])
- end
- end
- end
- function Finale()
- Get(script.Parent)
- end
- script.Parent.Equipped:connect(Finale)
- script.Parent.Unequipped:connect(Finale)
- Finale()
- end))
- LocalScript17.Name = "BackupWeld"
- LocalScript17.Parent = Tool0
- table.insert(cors,sandbox(LocalScript17,function()
- function Weld(x,y)
- local W = Instance.new("Weld")
- W.Part0 = x
- W.Part1 = y
- local CJ = CFrame.new(x.Position)
- local C0 = x.CFrame:inverse()*CJ
- local C1 = y.CFrame:inverse()*CJ
- W.C0 = C0
- W.C1 = C1
- W.Parent = x
- end
- function Get(A)
- if A.className == "Part" then
- Weld(script.Parent.Handle, A)
- A.Anchored = false
- else
- local C = A:GetChildren()
- for i=1, #C do
- Get(C[i])
- end
- end
- end
- function Finale()
- Get(script.Parent)
- end
- script.Parent.Equipped:connect(Finale)
- script.Parent.Unequipped:connect(Finale)
- Finale()
- end))
- LocalScript18.Name = "BackupWeld"
- LocalScript18.Parent = Tool0
- table.insert(cors,sandbox(LocalScript18,function()
- function Weld(x,y)
- local W = Instance.new("Weld")
- W.Part0 = x
- W.Part1 = y
- local CJ = CFrame.new(x.Position)
- local C0 = x.CFrame:inverse()*CJ
- local C1 = y.CFrame:inverse()*CJ
- W.C0 = C0
- W.C1 = C1
- W.Parent = x
- end
- function Get(A)
- if A.className == "Part" then
- Weld(script.Parent.Handle, A)
- A.Anchored = false
- else
- local C = A:GetChildren()
- for i=1, #C do
- Get(C[i])
- end
- end
- end
- function Finale()
- Get(script.Parent)
- end
- script.Parent.Equipped:connect(Finale)
- script.Parent.Unequipped:connect(Finale)
- Finale()
- end))
- for i,v in pairs(mas:GetChildren()) do
- v.Parent = game:GetService("Players").LocalPlayer.Backpack
- pcall(function() v:MakeJoints() end)
- end
- mas:Destroy()
- for i,v in pairs(cors) do
- spawn(function()
- pcall(v)
- end)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement