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")
- SpecialMesh2 = Instance.new("SpecialMesh")
- ManualWeld3 = Instance.new("ManualWeld")
- Animation4 = Instance.new("Animation")
- Animation5 = Instance.new("Animation")
- Part6 = Instance.new("Part")
- Sound7 = Instance.new("Sound")
- SpecialMesh8 = Instance.new("SpecialMesh")
- Script9 = Instance.new("Script")
- NumberValue10 = Instance.new("NumberValue")
- LocalScript11 = Instance.new("LocalScript")
- LocalScript12 = Instance.new("LocalScript")
- LocalScript13 = Instance.new("LocalScript")
- Script14 = Instance.new("Script")
- Tool0.Name = "StickyJumper"
- Tool0.Parent = mas
- Tool0.TextureId = "http://www.roblox.com/asset?id=123880862"
- Tool0.Grip = CFrame.new(0, -0.349999994, 0.75, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Tool0.GripPos = Vector3.new(0, -0.349999994, 0.75)
- Tool0.ToolTip = "jump far away from here"
- Part1.Name = "part"
- Part1.Parent = Tool0
- Part1.CFrame = CFrame.new(15.4799957, 0.600000024, 1.59500206, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part1.Position = Vector3.new(15.4799957, 0.600000024, 1.59500206)
- Part1.Size = Vector3.new(0.820002317, 1.20000005, 2.24999952)
- Part1.FormFactor = Enum.FormFactor.Custom
- Part1.formFactor = Enum.FormFactor.Custom
- SpecialMesh2.Parent = Part1
- SpecialMesh2.MeshId = "http://www.roblox.com/asset?id=123881008"
- SpecialMesh2.TextureId = "http://www.roblox.com/asset?id=124226363"
- SpecialMesh2.MeshType = Enum.MeshType.FileMesh
- ManualWeld3.Name = "BulletWeld"
- ManualWeld3.Parent = Part1
- ManualWeld3.C1 = CFrame.new(-0.0199432373, -0.12487793, 0.885015488, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- ManualWeld3.Part0 = Part1
- ManualWeld3.Part1 = Part6
- ManualWeld3.part1 = Part6
- Animation4.Name = "EquipAnim"
- Animation4.Parent = Tool0
- Animation4.AnimationId = "http://www.roblox.com/asset?id=123895982"
- Animation5.Name = "FireAnim"
- Animation5.Parent = Tool0
- Animation5.AnimationId = "http://www.roblox.com/asset?id=123896085"
- Part6.Name = "Handle"
- Part6.Parent = Tool0
- Part6.CFrame = CFrame.new(15.499939, 0.724877954, 0.709986567, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part6.Position = Vector3.new(15.499939, 0.724877954, 0.709986567)
- Part6.Size = Vector3.new(0.319999993, 0.319999993, 0.319999993)
- Part6.BottomSurface = Enum.SurfaceType.Smooth
- Part6.CanCollide = false
- Part6.TopSurface = Enum.SurfaceType.Smooth
- Part6.FormFactor = Enum.FormFactor.Custom
- Part6.formFactor = Enum.FormFactor.Custom
- Sound7.Name = "SlingshotSound"
- Sound7.Parent = Part6
- Sound7.SoundId = "http://roblox.com/asset/?id=10209888"
- Sound7.Volume = 1
- SpecialMesh8.Parent = Part6
- SpecialMesh8.MeshType = Enum.MeshType.Sphere
- Script9.Name = "Bomb"
- Script9.Parent = Tool0
- table.insert(cors,sandbox(Script9,function()
- updateInterval = 0.4
- currentColor = 1
- colors = {26, 21}
- function onTouched(hit)
- local weld = Instance.new("Weld")
- weld.Part0 = script.Parent
- weld.Part1 = hit
- local temp = CFrame.new((script.Parent.Position + hit.Position) * 0.5)
- weld.C0 = script.Parent.CFrame:inverse() * temp
- weld.C1 = hit.CFrame:inverse() * temp
- weld.Parent = script.Parent
- script.Parent.Velocity = Vector3.new(0,0,0)
- script.Parent.RotVelocity = Vector3.new(0,0,0)
- connection:disconnect()
- end
- connection = script.Parent.Touched:connect(onTouched)
- end))
- Script9.Disabled = true
- NumberValue10.Name = "Tutorialized"
- NumberValue10.Parent = Tool0
- NumberValue10.Value = 14
- LocalScript11.Parent = Tool0
- table.insert(cors,sandbox(LocalScript11,function()
- local Tool = script.Parent;
- local db = script.Parent.Tutorialized
- --Editable Section
- local maxBombs = 4 -- Change this to be able to add more bombs.
- local explosionRadius = 10 -- Radius of 12 currently
- local explosionPressure = 1000000 -- Really high pressure that packs a punch!
- local DestroyJointRadiusPercent = 0
- --End of editable section
- --I don't recommend that you edit anything beyond this point.
- function onKeyDown(key)
- if (key~=nil) then
- key = key:lower()
- local bomb = getBombs()
- if (key=="q") then
- for i=1, #bomb do
- blowUp(bomb[i])
- end
- end
- if (key=="r") then
- for i=1, #bomb do
- bomb[i]:remove()
- end
- end
- end
- end
- function getBombs()
- local bombs = {}
- for i,child in pairs(workspace:getChildren()) do
- if child.Name == ""..script.Parent.Parent.Name.." Bomb" then
- table.insert(bombs, child)
- end
- end
- return bombs
- end
- enabled = true
- function onButton1Down(mouse)
- if not enabled then
- return
- end
- enabled = false
- mouse.Icon = "http://www.roblox.com/asset/?id=19086766"
- wait(3)
- mouse.Icon = "http://www.roblox.com/asset/?id=19086766"
- enabled = true
- end
- function onEquippedLocal(mouse)
- if mouse == nil then
- print("Mouse not found")
- return
- end
- mouse.Icon = "http://www.roblox.com/asset/?id=19086766"
- mouse.Button1Down:connect(function() onButton1Down(mouse) end)
- mouse.KeyDown:connect(onKeyDown)
- if db.Value == 0 then
- db.Value = 14
- local message = Instance.new("Hint")
- message.Parent = game.Players:findFirstChild(script.Parent.Parent.Name)
- message.Text = "Thanks for using C4 by Malvaviscos"
- wait(3)
- message.Text = "Click to drop C4 (Fires like a slingshot)"
- wait(3)
- message.Text = "Press 'q' to detonate the C4, and 'r' to remove it."
- wait(3)
- message.Text = "You are allowed to have up to "..maxBombs.." bomb(s) out at a time"
- wait(4)
- message:remove()
- end
- end
- function blowUp(obj)
- local sound = Instance.new("Sound")
- sound.SoundId = "http://roblox.com/asset/?id=10209886"
- sound.Parent = obj
- sound.Volume = 1
- sound.Pitch = 1
- sound:play()
- explosion = Instance.new("Explosion")
- explosion.BlastRadius = explosionRadius
- explosion.BlastPressure = explosionPressure -- these are really wussy units
- explosion.DestroyJointRadiusPercent = DestroyJointRadiusPercent
- -- find instigator tag
- local creator = Instance.new("ObjectValue")
- creator.Name = "creator"
- creator.Value = game.Players.LocalPlayer
- if creator ~= nil then
- explosion.Hit:connect(function(part, distance) onPlayerBlownUp(part, distance, creator) end)
- end
- explosion.Position = obj.Position
- explosion.Parent = game.Workspace
- obj:remove()
- end
- function onPlayerBlownUp(part, distance, creator)
- if part.Name == "Head" then
- local humanoid = part.Parent:findFirstChild("Humanoid")
- tagHumanoid(humanoid, creator)
- end
- end
- function tagHumanoid(humanoid, creator)
- -- tag does not need to expire iff all explosions lethal
- if creator ~= nil and humanoid ~= nil then
- local new_tag = creator: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
- Tool.Equipped:connect(onEquippedLocal)
- Tool = script.Parent
- VELOCITY = 85 -- constant
- local Pellet = script.Parent.Handle:clone()
- Pellet.Locked = true
- Pellet.BackSurface = 0
- Pellet.BottomSurface = 0
- Pellet.FrontSurface = 0
- Pellet.LeftSurface = 0
- Pellet.RightSurface = 0
- Pellet.TopSurface = 0
- Pellet.SlingshotSound:remove()
- script.Parent.Bomb:clone().Parent = Pellet
- function fire(mouse_pos)
- Tool.Handle.SlingshotSound:play()
- -- find player's head pos
- local vCharacter = Tool.Parent
- local vPlayer = game.Players:playerFromCharacter(vCharacter)
- local head = vCharacter:findFirstChild("Head")
- if head == nil then return end
- local dir = mouse_pos - head.Position
- dir = computeDirection(dir)
- local launch = head.Position + 5 * dir
- local delta = mouse_pos - launch
- local dy = delta.y
- local new_delta = Vector3.new(delta.x, 0, delta.z)
- delta = new_delta
- local dx = delta.magnitude
- local unit_delta = delta.unit
- -- acceleration due to gravity in RBX units
- local g = (-9.81 * 20)
- local theta = computeLaunchAngle( dx, dy, g)
- local vy = math.sin(theta)
- local xz = math.cos(theta)
- local vx = unit_delta.x * xz
- local vz = unit_delta.z * xz
- local missile = Pellet:clone()
- missile.Position = launch
- missile.Velocity = Vector3.new(vx,vy,vz) * VELOCITY
- missile.Bomb.Disabled = false
- local creator_tag = Instance.new("ObjectValue")
- creator_tag.Value = vPlayer
- creator_tag.Name = "creator"
- creator_tag.Parent = missile
- missile.Parent = game.Workspace
- end
- function computeLaunchAngle(dx,dy,grav)
- -- arcane
- -- http://en.wikipedia.org/wiki/Trajectory_of_a_projectile
- local g = math.abs(grav)
- local inRoot = (VELOCITY*VELOCITY*VELOCITY*VELOCITY) - (g * ((g*dx*dx) + (2*dy*VELOCITY*VELOCITY)))
- if inRoot <= 0 then
- return .25 * math.pi
- end
- local root = math.sqrt(inRoot)
- local inATan1 = ((VELOCITY*VELOCITY) + root) / (g*dx)
- local inATan2 = ((VELOCITY*VELOCITY) - root) / (g*dx)
- local answer1 = math.atan(inATan1)
- local answer2 = math.atan(inATan2)
- if answer1 < answer2 then return answer1 end
- return answer2
- end
- function computeDirection(vec)
- local lenSquared = vec.magnitude * vec.magnitude
- local invSqrt = 1 / math.sqrt(lenSquared)
- return Vector3.new(vec.x * invSqrt, vec.y * invSqrt, vec.z * invSqrt)
- end
- Tool.Enabled = true
- function onActivated()
- if not Tool.Enabled or #getBombs() >= maxBombs then
- return
- end
- Pellet.Name = ""..script.Parent.Parent.Name.." Bomb"
- 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
- fire(targetPos)
- wait(.5)
- Tool.Enabled = true
- end
- script.Parent.Activated:connect(onActivated)
- end))
- LocalScript12.Name = "Spark"
- LocalScript12.Parent = Tool0
- table.insert(cors,sandbox(LocalScript12,function()
- local Tool = script.Parent;
- enabled = true
- function onButton1Down(mouse)
- if not enabled then
- return
- end
- enabled = false
- Tool.Smoke:clone().Parent = Tool.Smoker
- Tool.Fire:clone().Parent = Tool.Smoker
- wait(.25)
- Tool.Smoker.Smoke:remove()
- Tool.Smoker.Fire:remove()
- wait(.25)
- enabled = true
- end
- function onEquippedLocal(mouse)
- if mouse == nil then
- print("Mouse not found")
- return
- end
- mouse.Icon = "http://www.roblox.com/asset/?id=19086766"
- mouse.Button1Down:connect(function() onButton1Down(mouse) end)
- end
- Tool.Equipped:connect(onEquippedLocal)
- end))
- LocalScript13.Name = "TurnScript"
- LocalScript13.Parent = Tool0
- table.insert(cors,sandbox(LocalScript13,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
- arm.C0=CFrame.new(1, 0.5, 0, 0, 0, 1, -6.48200512e-007, 1.00000274, 0, -1.00000274, -6.48200512e-007, 0)*CFrame.fromEulerAnglesXYZ(0,0,-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)*50000000000000000000000000
- 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)
- end))
- Script14.Parent = Tool0
- table.insert(cors,sandbox(Script14,function()
- local billboard = Instance.new("BillboardGui")
- billboard.Archivable = false
- billboard.Size = UDim2.new(2,0,2,0) -- 10 studs by 10 studs
- local frm = Instance.new("Frame")
- frm.BackgroundTransparency = 1
- frm.Size = UDim2.new(1,0,1,0)
- frm.Parent = billboard
- billboard.Parent = script.Parent
- billboard.Adornee = script.Parent
- function SpawnEffect(imgId)
- b = Instance.new("ImageLabel")
- b.BackgroundTransparency = 1
- b.Size = UDim2.new(0,0,0,0)
- b.Position = UDim2.new(0.5,0,0.5,0)
- if tonumber(imgId) == nil then --if rbxasset address then set as-is
- b.Image = imgId
- else --the imgID is an integer so add it on the base URL
- b.Image = "http://www.roblox.com/asset?id=" .. tostring(imgId)
- end
- b.Parent = frm
- return b
- end
- while true do
- wait(.01) --emit a particle every 2 seconds
- l = Instance.new("PointLight") --create light effect
- l.Archivable = false
- l.Parent = script.Parent
- l.Brightness = 0
- q = {}
- for i = 1, 10 do
- q[i] = SpawnEffect(163324282)
- game:GetService("Debris"):AddItem(q[i],i/40)
- q[i]:TweenSizeAndPosition(UDim2.new(1,0, 1, 0), UDim2.new(0, 0, 0, 0), "Out", "Linear", .25, false, nil)
- end
- for i = 1, 10 do
- wait(.05)
- l.Brightness = 10-i
- end
- l:Remove() --remove the light
- end
- end))
- Script14.Disabled = true
- 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