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")
- Script4 = Instance.new("Script")
- LocalScript5 = Instance.new("LocalScript")
- Script6 = Instance.new("Script")
- Configuration7 = Instance.new("Configuration")
- BoolValue8 = Instance.new("BoolValue")
- Configuration9 = Instance.new("Configuration")
- NumberValue10 = Instance.new("NumberValue")
- NumberValue11 = Instance.new("NumberValue")
- StringValue12 = Instance.new("StringValue")
- BoolValue13 = Instance.new("BoolValue")
- BoolValue14 = Instance.new("BoolValue")
- StringValue15 = Instance.new("StringValue")
- ObjectValue16 = Instance.new("ObjectValue")
- Tool0.Name = "Trap"
- Tool0.Parent = mas
- Tool0.GripForward = Vector3.new(-0, 1, -0)
- Tool0.GripPos = Vector3.new(0, -0.550000012, -0.649999976)
- Tool0.GripUp = Vector3.new(0, 0, 1)
- Part1.Name = "Handle"
- Part1.Parent = Tool0
- Part1.Rotation = Vector3.new(-90, 0, -90)
- Part1.FormFactor = Enum.FormFactor.Plate
- Part1.Size = Vector3.new(1, 3.60000014, 1)
- Part1.CFrame = CFrame.new(13.1099844, 25.6800003, 865.159973, 0, 1, 0, 0, 0, 1, 1, 0, 0)
- Part1.BottomSurface = Enum.SurfaceType.Smooth
- Part1.TopSurface = Enum.SurfaceType.Smooth
- Part1.Position = Vector3.new(13.1099844, 25.6800003, 865.159973)
- Part1.Orientation = Vector3.new(-90, -90, 0)
- Sound2.Name = "EquipSound"
- Sound2.Parent = Part1
- Sound2.SoundId = "http://www.roblox.com/asset/?id=10756118"
- SpecialMesh3.Parent = Part1
- SpecialMesh3.MeshId = "http://www.roblox.com/asset/?id=11915746"
- SpecialMesh3.TextureId = "http://www.roblox.com/asset/?id=87812844"
- SpecialMesh3.MeshType = Enum.MeshType.FileMesh
- Script4.Name = "RayGun"
- Script4.Parent = Tool0
- table.insert(cors,sandbox(Script4,function()
- local Tool = script.Parent;
- enabled = true
- local spark = Instance.new("Sparkles")
- function fire(v)
- local vCharacter = Tool.Parent
- local vPlayer = game.Players:playerFromCharacter(vCharacter)
- local missile = Instance.new("Part")
- local spawnPos = vCharacter.PrimaryPart.Position
- local PewPew = Tool.Handle:FindFirstChild("PewPew")
- if (PewPew == nil) then
- PewPew = Instance.new("Sound")
- PewPew.Name = "PewPew"
- PewPew.SoundId = "http://www.roblox.com/asset/?id=11944350"
- PewPew.Parent = Tool.Handle
- PewPew.Volume = 1
- end
- spawnPos = spawnPos + (v * 10)
- missile.Position = spawnPos
- missile.Size = Vector3.new(40,40,40)
- missile.Velocity = v * 200
- missile.BrickColor = BrickColor.new("Lime green")
- missile.Shape = 2
- missile.Transparency = script.Parent.Settings.Transperancy.Value
- missile.BottomSurface = 0
- missile.TopSurface = 0
- missile.Name = script.Parent.Settings.Name
- missile.Reflectance = script.Parent.Settings.Reflect.Value
- missile.CanCollide = script.Parent.Settings.Collide.Value
- missile.Material = script.Parent.Settings.Materializer.Value
- missile.Locked = script.Parent.Settings.Locked.Value
- missile.Anchored = script.Parent.BreakSpark.Anchor.Value
- spark:Clone().Parent = missile
- spark.Color = missile.Color
- local force = Instance.new("BodyForce")
- force.force = Vector3.new(0,100,0)
- force.Parent = missile
- local creator_tag = Instance.new("ObjectValue")
- creator_tag.Value = vPlayer
- creator_tag.Name = "creator"
- creator_tag.Parent = missile
- local new_script = script.Parent.LaserBlast:clone()
- new_script.Disabled = false
- new_script.Parent = missile
- missile.Parent = game.Workspace
- PewPew:Play()
- end
- function gunUp()
- Tool.GripForward = Vector3.new(0,.981,-.196)
- Tool.GripRight = Vector3.new(1,0,0)
- Tool.GripUp = Vector3.new(0,.196,.981)
- end
- function gunOut()
- Tool.GripForward = Vector3.new(0,1,0)
- Tool.GripRight = Vector3.new(1,0,0)
- Tool.GripUp = Vector3.new(0,0,1)
- end
- function isTurbo(character)
- return character:FindFirstChild("BoltHelm") ~= nil
- end
- function onActivated()
- if not enabled then
- return
- end
- 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
- local reload = 1
- --if (isTurbo(character)) then
- -- reload = .25
- -- print("turbo")
- --end
- gunUp()
- fire(lookAt)
- wait(reload)
- gunOut()
- wait(reload)
- enabled = true
- end
- function onEquipped()
- Tool.Handle.EquipSound:play()
- end
- script.Parent.Activated:connect(onActivated)
- script.Parent.Equipped:connect(onEquipped)
- end))
- LocalScript5.Name = "Local Gui"
- LocalScript5.Parent = Tool0
- table.insert(cors,sandbox(LocalScript5,function()
- local Tool = script.Parent;
- enabled = true
- function onButton1Down(mouse)
- if not enabled then
- return
- end
- enabled = false
- mouse.Icon = "rbxasset://textures\\GunWaitCursor.png"
- wait(1)
- mouse.Icon = "rbxasset://textures\\GunCursor.png"
- enabled = true
- 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)
- end
- Tool.Equipped:connect(onEquippedLocal)
- end))
- Script6.Name = "LaserBlast"
- Script6.Parent = Tool0
- Script6.Disabled = true
- table.insert(cors,sandbox(Script6,function()
- ball = script.Parent
- damage = 9000
- HitSound = Instance.new("Sound")
- HitSound.Name = "HitSound"
- HitSound.SoundId = "http://www.roblox.com/asset/?id=11945266"
- HitSound.Parent = ball
- HitSound.Volume = 1
- function onTouched(hit)
- local humanoid = hit.Parent:findFirstChild("Humanoid")
- if humanoid ~= nil then
- tagHumanoid(humanoid)
- humanoid:TakeDamage(damage)
- plyr = ball:findFirstChild("creator").Value
- plyr.leaderstats.Points.Value = plyr.leaderstats.Points.Value + 4
- wait(0.2)
- untagHumanoid(humanoid)
- end
- HitSound:Play()
- 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(5)
- script.Parent:Destroy()
- --ball.SparkSound.Looped = false
- --ball.SparkSound:Stop()
- ball.Parent = nil
- end))
- Configuration7.Name = "BreakSpark"
- Configuration7.Parent = Tool0
- BoolValue8.Name = "Anchor"
- BoolValue8.Parent = Configuration7
- BoolValue8.Value = true
- Configuration9.Name = "Settings"
- Configuration9.Parent = Tool0
- NumberValue10.Name = "Transperancy"
- NumberValue10.Parent = Configuration9
- NumberValue10.Value = 0.5
- NumberValue11.Name = "Reflect"
- NumberValue11.Parent = Configuration9
- NumberValue11.Value = 0.4
- StringValue12.Name = "Name"
- StringValue12.Parent = Configuration9
- StringValue12.Value = "NAY"
- BoolValue13.Name = "Locked"
- BoolValue13.Parent = Configuration9
- BoolValue13.Value = true
- BoolValue14.Name = "Collide"
- BoolValue14.Parent = Configuration9
- BoolValue14.Value = true
- StringValue15.Name = "Materializer"
- StringValue15.Parent = Configuration9
- StringValue15.Value = "Neon"
- ObjectValue16.Name = "Note - This is made by Anime"
- ObjectValue16.Parent = Tool0
- 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