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")
- Part1 = Instance.new("Part")
- Sound2 = Instance.new("Sound")
- SpecialMesh3 = Instance.new("SpecialMesh")
- Weld4 = Instance.new("Weld")
- Weld5 = Instance.new("Weld")
- Sound6 = Instance.new("Sound")
- Script7 = Instance.new("Script")
- LocalScript8 = Instance.new("LocalScript")
- Script9 = Instance.new("Script")
- Script10 = Instance.new("Script")
- Tool0.Name = "Ting"
- Tool0.Parent = mas
- Tool0.GripForward = Vector3.new(-0, 6.00000021e-05, -1)
- Tool0.GripPos = Vector3.new(0, -0.200000003, -0.5)
- Tool0.GripUp = Vector3.new(0, 1, 6.00000021e-05)
- Part1.Name = "Handle"
- Part1.Parent = Tool0
- Part1.BrickColor = BrickColor.new("Black")
- Part1.RotVelocity = Vector3.new(7.38069024e-18, -1.40138574e-17, 4.40040608e-08)
- Part1.Velocity = Vector3.new(-4.46693704e-09, 0.00487950863, 2.47418787e-17)
- Part1.FormFactor = Enum.FormFactor.Symmetric
- Part1.Size = Vector3.new(1, 1, 2)
- Part1.CFrame = CFrame.new(1.5, 0.490971088, 1.7640066e-19, 1, -9.00066954e-09, -5.88002049e-20, 9.00066954e-09, 1, -1.96940413e-18, 5.88002179e-20, 1.96940413e-18, 1)
- Part1.BottomSurface = Enum.SurfaceType.Smooth
- Part1.TopSurface = Enum.SurfaceType.Smooth
- Part1.Color = Color3.new(0.105882, 0.164706, 0.207843)
- Part1.Position = Vector3.new(1.5, 0.490971088, 1.7640066e-19)
- Part1.Color = Color3.new(0.105882, 0.164706, 0.207843)
- Sound2.Name = "Reload"
- Sound2.Parent = Part1
- Sound2.Pitch = 0.5
- Sound2.SoundId = "rbxasset://sounds/uuhhh.wav"
- Sound2.Volume = 2
- SpecialMesh3.Parent = Part1
- SpecialMesh3.MeshId = "http://www.roblox.com/asset/?id=3824738"
- SpecialMesh3.Scale = Vector3.new(3, 3, 3)
- SpecialMesh3.TextureId = "rbxassetid://3824735"
- SpecialMesh3.MeshType = Enum.MeshType.FileMesh
- SpecialMesh3.Scale = Vector3.new(3, 3, 3)
- Weld4.Parent = Part1
- Weld4.C1 = CFrame.new(3, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Weld5.Parent = Part1
- Weld5.C1 = CFrame.new(3, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Weld5.Part0 = Part1
- Weld5.Part1 = nil
- Sound6.Name = "Skrraa"
- Sound6.Parent = Part1
- Sound6.SoundId = "rbxassetid://1056483428"
- Sound6.TimePosition = 1.45
- Sound6.Volume = 2
- Sound6.Looped = true
- Script7.Name = "WeldScript"
- Script7.Parent = Tool0
- table.insert(cors,sandbox(Script7,function()
- local w1 = Instance.new("Weld")
- w1.Parent = script.Parent.Handle
- w1.Part0 = w1.Parent
- w1.Part1 = script.Parent.Handle2
- w1.C1 = CFrame.new(3, 0, 0)
- end))
- LocalScript8.Name = "Local Gui"
- LocalScript8.Parent = Tool0
- table.insert(cors,sandbox(LocalScript8,function()
- local Tool = script.Parent;
- enabled = true
- function onButton1Down(mouse)
- if not enabled then
- return
- end
- Tool.Handle.Skrraa.TimePosition = 1.45
- Tool.Handle.Skrraa:Play()
- enabled = true
- mouse.Icon = "rbxasset://textures\\GunCursor.png"
- --wait(.5)
- --mouse.Icon = "rbxasset://textures\\GunCursor.png"
- --enabled = true
- --mouse.Button1Up:connect(function() onButton1Up(mouse) end)
- end
- function onButton1Up(mouse)
- Tool.Handle.Skrraa:Stop()
- enabled = false
- Tool.Enabled = false
- Tool.Handle.Mesh.TextureId = "rbxassetid://1153567850"
- mouse.Icon = "rbxasset://textures\\GunWaitCursor.png"
- script.Parent.Handle.Reload:Play()
- script.Parent.Handle.Reload.Ended:Wait()
- mouse.Icon = "rbxasset://textures\\GunCursor.png"
- enabled = true
- Tool.Enabled = true
- Tool.Handle.Mesh.TextureId = "rbxassetid://3824735"
- end
- function onEquippedLocal(mouse)
- if mouse == nil then
- print("Mouse not found")
- return
- end
- mouse.Icon = "rbxasset://textures\\GunCursor.png"
- mouse.Button1Down:connect(function() onButton1Down(mouse) end)
- mouse.Button1Up:connect(function() onButton1Up(mouse)end)
- end
- Tool.Equipped:connect(onEquippedLocal)
- end))
- Script9.Name = "PaintballShooter"
- Script9.Parent = Tool0
- table.insert(cors,sandbox(Script9,function()
- Tool = script.Parent
- colors = {226,24,}
- function fire(v)
- local vCharacter = Tool.Parent
- local vPlayer = game.Players:playerFromCharacter(vCharacter)
- local missile = Instance.new("Part")
- local spawnPos = vCharacter.PrimaryPart.Position
- spawnPos = spawnPos + (v * 8)
- missile.Position = spawnPos
- missile.Size = Vector3.new(1,1,1)
- missile.Velocity = v * 1000
- missile.BrickColor = BrickColor.new(colors[math.random(1, #colors)])
- missile.Shape = 1
- missile.BottomSurface = 0
- missile.TopSurface = 0
- missile.Name = "Paintball"
- missile.Elasticity = 0
- missile.Reflectance = 0
- missile.Friction = 1
- local force = Instance.new("BodyForce")
- force.force = Vector3.new(0,220,0)
- force.Parent = missile
- local new_script = script.Parent.Paintball:clone()
- new_script.Disabled = false
- new_script.Parent = missile
- local creator_tag = Instance.new("ObjectValue")
- creator_tag.Value = vPlayer
- creator_tag.Name = "creator"
- creator_tag.Parent = missile
- local gui = Instance.new("BillboardGui")
- gui.AlwaysOnTop = true
- gui.Size = UDim2.new(0,64,0,64)
- gui.Parent = missile
- gui.Adornee = missile
- gui.LightInfluence = 0
- local image = Instance.new("ImageLabel")
- image.Image = "rbxassetid://1153567850"
- image.Size = UDim2.new(1,0,1,0)
- image.BorderSizePixel = 0
- image.Parent = gui
- missile.Parent = game.Workspace
- game:GetService("Debris"):AddItem(missile, 10)
- --wait(0.05)
- --fire(
- end
- function check(en)
- ---------------------------------------Function start here.
- if (Tool.Enabled == false) then
- return false
- end--end for if!
- -------------------------------
- if (Tool.Enabled == true) then
- return true
- end
- ---------------------------------------Function end here.
- end
- Tool.Enabled = true
- function onActivated()
- if not Tool.Enabled then
- return
- end
- --Tool.Enabled = false
- local character = Tool.Parent;
- local humanoid = character.Humanoid
- if humanoid == nil then
- print("Humanoid not found")
- return
- end
- local targetPos = humanoid.TargetPoint
- local lookAt = (targetPos - character.Head.Position).unit
- if (check()) then
- fire(lookAt)
- wait()
- onActivated()
- end
- return
- --Tool.Enabled = true
- end
- script.Parent.Activated:connect(onActivated)
- end))
- Script10.Name = "Paintball"
- Script10.Parent = Tool0
- table.insert(cors,sandbox(Script10,function()
- ball = script.Parent
- damage = Instance.new("Explosion")
- damage.BlastRadius = 16
- damage.BlastPressure = 200000
- function onTouched(hit)
- --local humanoid = hit.Parent:findFirstChild("Humanoid")
- e=damage:clone()
- e.Parent = ball
- e.Position = ball.Position
- -- make a splat
- --for i=1,3 do
- -- local s = Instance.new("Part")
- -- s.Shape = 1 -- block
- -- s.formFactor = 2 -- plate
- -- s.Size = Vector3.new(1,.4,1)
- -- s.BrickColor = ball.BrickColor
- -- local v = Vector3.new(math.random(-1,1), math.random(0,1), math.random(-1,1))
- -- s.Velocity = 15 * v--15
- -- s.CFrame = CFrame.new(ball.Position + v, v)
- --- ball.BrickCleanup:clone().Parent = s
- -- s.BrickCleanup.Disabled = false
- -- s.Parent = game.Workspace
- --
- --end
- --if humanoid ~= nil then
- -- tagHumanoid(humanoid)
- wait(2)
- -- untagHumanoid(humanoid)
- --end
- e:remove()
- connection:disconnect()
- ball.Parent = nil
- end
- function tagHumanoid(humanoid)
- -- todo: make tag expire
- local tag = ball:findFirstChild("creator")
- if tag ~= nil then
- local new_tag = tag:clone()
- new_tag.Parent = humanoid
- end
- end
- function untagHumanoid(humanoid)
- if humanoid ~= nil then
- local tag = humanoid:findFirstChild("creator")
- if tag ~= nil then
- tag.Parent = nil
- end
- end
- end
- connection = ball.Touched:connect(onTouched)
- wait(8)
- ball.Parent = nil
- 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