Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Objects To Lua Make By HairBaconGamming --
- local Module_Scripts = {}
- local SubspaceTripmine = Instance.new("Tool")
- local Handle = Instance.new("Part")
- local Mesh = Instance.new("SpecialMesh")
- local Local_Gui = Instance.new("LocalScript")
- local PlantBomb = Instance.new("Script")
- local SubspaceMine = Instance.new("Script")
- -- Properties --
- SubspaceTripmine.Grip = CFrame.new(-0.5, 0, 0, 0, 0, -1, -0, 1, 0, 1, 0, 0)
- SubspaceTripmine.GripForward = Vector3.new(1, -0, -0)
- SubspaceTripmine.GripPos = Vector3.new(-0.5, 0, 0)
- SubspaceTripmine.GripRight = Vector3.new(0, -0, 1)
- SubspaceTripmine.Name = [[SubspaceTripmine]]
- SubspaceTripmine.Parent = owner.Backpack
- SubspaceTripmine.TextureId = [[http://www.roblox.com/asset/?id=11987521]]
- Handle.BottomSurface = Enum.SurfaceType.Smooth
- Handle.BrickColor = BrickColor.new([[Hot pink]])
- Handle.CFrame = CFrame.new(-2, 3.4000001, 10, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Handle.Color = Color3.new(1, 0, 0.74902)
- Handle.Name = [[Handle]]
- Handle.Parent = SubspaceTripmine
- Handle.Position = Vector3.new(-2, 3.4000000953674316, 10)
- Handle.Size = Vector3.new(2, 2, 2)
- Handle.TopSurface = Enum.SurfaceType.Smooth
- Mesh.MeshId = [[http://www.roblox.com/asset/?id=11954776]]
- Mesh.MeshType = Enum.MeshType.FileMesh
- Mesh.Parent = Handle
- Mesh.Scale = Vector3.new(0.699999988079071, 0.699999988079071, 0.699999988079071)
- Mesh.TextureId = [[http://www.roblox.com/asset/?id=11954766]]
- function Local_Gui_ScriptfakeXD()
- local script = Instance.new("LocalScript",SubspaceTripmine)
- Local_Gui = script
- script.Name = [[Local Gui]]
- local require_fake = require
- local require = function(Object)
- local functiom = Module_Scripts[Object]
- if functiom then
- return functiom()
- end
- return require_fake(Object)
- end
- local Tool = script.Parent;
- enabled = true
- function onButton1Down(mouse)
- if not enabled then
- return
- end
- enabled = false
- mouse.Icon = "rbxasset://textures\\ArrowFarCursor.png"
- wait(3)
- mouse.Icon = "rbxasset://textures\\ArrowCursor.png"
- enabled = true
- end
- function onEquippedLocal(mouse)
- if mouse == nil then
- print("Mouse not found")
- return
- end
- mouse.Icon = "rbxasset://textures\\ArrowCursor.png"
- mouse.Button1Down:connect(function() onButton1Down(mouse) end)
- end
- Tool.Equipped:connect(onEquippedLocal)
- end
- coroutine.wrap(Local_Gui_ScriptfakeXD)()
- function PlantBomb_ScriptfakeXD()
- local script = Instance.new("Script",SubspaceTripmine)
- PlantBomb = script
- script.Name = [[PlantBomb]]
- local require_fake = require
- local require = function(Object)
- local functiom = Module_Scripts[Object]
- if functiom then
- return functiom()
- end
- return require_fake(Object)
- end
- bombScript = script.Parent.SubspaceMine
- Tool = script.Parent
- function plant(pos)
- local vCharacter = Tool.Parent
- local vPlayer = game.Players:playerFromCharacter(vCharacter)
- local spawnPos = vCharacter.PrimaryPart.Position
- local bomb = Tool.Handle:Clone()
- bomb.CanCollide = true
- bomb.Transparency = 0
- bomb.Position = pos
- bomb.Size = Vector3.new(2,2,2)
- bomb.Name = "SubspaceTripmine"
- bomb.Locked = true
- local creator_tag = Instance.new("ObjectValue")
- creator_tag.Value = vPlayer
- creator_tag.Name = "creator"
- creator_tag.Parent = bomb
- bomb.Parent = game.Workspace
- local new_script = bombScript:clone()
- new_script.Disabled = false
- new_script.Parent = bomb
- 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
- Tool.Handle.Transparency = 1
- plant(Tool.Handle.Position)
- wait(3)
- Tool.Handle.Transparency = 0
- Tool.Enabled = true
- end
- script.Parent.Activated:connect(onActivated)
- end
- coroutine.wrap(PlantBomb_ScriptfakeXD)()
- function SubspaceMine_ScriptfakeXD()
- local script = Instance.new("Script",SubspaceTripmine)
- SubspaceMine = script
- script.Name = [[SubspaceMine]]
- local require_fake = require
- local require = function(Object)
- local functiom = Module_Scripts[Object]
- if functiom then
- return functiom()
- end
- return require_fake(Object)
- end
- Mine = script.Parent
- DunDun = Instance.new("Sound")
- DunDun.SoundId = "http://www.roblox.com/asset/?id=11984254"
- DunDun.Parent = Mine
- SubspaceExplosion = Instance.new("Sound")
- SubspaceExplosion.SoundId = "http://www.roblox.com/asset/?id=11984351"
- SubspaceExplosion.Parent = Mine
- Calibrate = Instance.new("Sound")
- Calibrate.SoundId = "http://www.roblox.com/asset/?id=11956590"
- Calibrate.Looped = true
- Calibrate.Parent = Mine
- Calibrate:Play()
- local calibration_time = 2 -- needs to be still/untouched for this long before calibrating
- local cur_time = 0
- local max_life = 120 -- these things last for 2 minutes on their own, once activated
- local calibrated = false
- local connection = nil
- function activateMine()
- for i=0,1,.1 do
- Mine.Transparency = i
- wait(.05)
- end
- calibrated = true
- Calibrate:Stop()
- end
- function pulse()
- DunDun:Play()
- for i=.9,.5,-.1 do
- Mine.Transparency = i
- wait(.05)
- end
- for i=.5,1,.1 do
- Mine.Transparency = i
- wait(.05)
- end
- end
- function explode()
- connection:disconnect()
- for i=1,0,-.2 do
- Mine.Transparency = i
- wait(.05)
- end
- SubspaceExplosion:Play()
- local e = Instance.new("Explosion")
- e.BlastRadius = 16
- e.BlastPressure = 1000000
- e.Position = Mine.Position
- e.Parent = Mine
- local creator = script.Parent:findFirstChild("creator")
- e.Hit:connect(function(part, distance) onPlayerBlownUp(part, distance, creator) end)
- for i=0,1,.2 do
- Mine.Transparency = i
- wait(.05)
- end
- wait(4)
- Mine:Remove()
- end
- function update()
- if (calibrated == false) then
- if (Mine.Velocity.magnitude > .05) then
- cur_time = 0
- end
- if (cur_time > calibration_time) then
- activateMine()
- end
- else
- -- calibrated mine
- if (math.random(1,20) == 2) then
- pulse()
- end
- if (cur_time > max_life) then pulse() Mine:Remove() end
- end
- end
- function OnTouch(part)
- if (calibrated == false) then
- cur_time = 0
- else
- explode()
- end
- end
- function onPlayerBlownUp(part, distance, creator)
- if (part:getMass() < 300) then
- part.BrickColor = BrickColor.new(1032)
- local s = Instance.new("Sparkles")
- s.Parent = part
- game.Debris:AddItem(s, 5)
- end
- if creator ~= nil and part.Name == "Head" then
- local humanoid = part.Parent.Humanoid
- tagHumanoid(humanoid, creator)
- end
- end
- function tagHumanoid(humanoid, creator)
- -- tag does not need to expire iff all explosions lethal
- if creator ~= 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
- connection = Mine.Touched:connect(OnTouch)
- while true do
- update()
- local e,g = wait(.5)
- cur_time = cur_time + e
- end
- end
- coroutine.wrap(SubspaceMine_ScriptfakeXD)()
- -- End --
- -- Thank for using --
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement