Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --By Rufus14
- --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")
- EqualizerSoundEffect3 = Instance.new("EqualizerSoundEffect")
- Beam4 = Instance.new("Beam")
- SpecialMesh5 = Instance.new("SpecialMesh")
- Script6 = Instance.new("Script")
- Tool0.Name = "taser"
- Tool0.Parent = mas
- Part1.Name = "Handle"
- Part1.Parent = Tool0
- Part1.CFrame = CFrame.new(-0.100037001, 7, -35, 0, -1, 6.12323426e-17, 0, 6.12323426e-17, 1, -1, 0, 0)
- Part1.Orientation = Vector3.new(-90, 90, 0)
- Part1.Position = Vector3.new(-0.10003700107336, 7, -35)
- Part1.Rotation = Vector3.new(-90, 0, 90)
- Part1.Size = Vector3.new(0.25, 0.5, 1.2999999523163)
- Part1.BottomSurface = Enum.SurfaceType.Smooth
- Part1.RotVelocity = Vector3.new(1, 1, 1)
- Part1.TopSurface = Enum.SurfaceType.Smooth
- Sound2.Name = "shoot"
- Sound2.Parent = Part1
- Sound2.SoundId = "rbxassetid://277635663"
- Sound2.Volume = 2
- EqualizerSoundEffect3.Parent = Sound2
- EqualizerSoundEffect3.LowGain = 10
- EqualizerSoundEffect3.MidGain = 2
- local at = Instance.new("Attachment", Part1)
- at.Position = Vector3.new(0, 0.2, -0.7)
- local a1t = Instance.new("Attachment", Part1)
- a1t.Position = Vector3.new(0, -0.2, -0.7)
- Beam4.Name = "beam"
- Beam4.Parent = Part1
- Beam4.Attachment0 = at
- Beam4.Attachment1 = a1t
- Beam4.CurveSize0 = -0.10000000149012
- Beam4.CurveSize1 = -0.10000000149012
- Beam4.Enabled = false
- Beam4.FaceCamera = true
- Beam4.LightEmission = 1
- Beam4.LightInfluence = 1
- Beam4.Segments = 20
- Beam4.Texture = "rbxassetid://0"
- Beam4.TextureMode = Enum.TextureMode.Wrap
- Beam4.TextureSpeed = 20
- Beam4.Width0 = 0.050000000745058
- Beam4.Width1 = 0.050000000745058
- SpecialMesh5.Parent = Part1
- SpecialMesh5.MeshId = "http://www.roblox.com/asset/?id=99866654"
- SpecialMesh5.Scale = Vector3.new(0.5, 0.5, 0.5)
- SpecialMesh5.TextureId = "http://www.roblox.com/asset/?id=99866675"
- SpecialMesh5.MeshType = Enum.MeshType.FileMesh
- Script6.Parent = Tool0
- table.insert(cors,sandbox(Script6,function()
- --By Rufus14
- local runservice = game:GetService("RunService")
- local players = game:GetService("Players")
- local debris = game:GetService("Debris")
- local tool = script.Parent
- local handle = tool.Handle
- local shoot = handle.shoot
- local beam = handle.beam
- local char
- local gdelta
- local toolstate = "unequipped"
- local tasefunc
- local stuntime = 7
- local lightbrightness = {
- ["true"] = {
- 5
- },
- ["false"] = {
- 0
- }
- }
- local tasedhums = {}
- local r15blacklist = {"LowerTorso", "UpperTorso"}
- function seizure(who, duration)
- local whoplr = players:GetPlayerFromCharacter(who)
- if whoplr then
- pcall(function()
- local screeng = Instance.new("ScreenGui")
- local frame = Instance.new("ImageLabel", screeng)
- frame.Image = "rbxasset://textures/ui/TopBar/WhiteOverlayAsset.png"
- frame.BackgroundTransparency = 1
- frame.ImageTransparency = 0.8
- frame.Size = UDim2.new(1,1,1,36)
- frame.Position = UDim2.new(0,0,0,-36)
- task.spawn(function()
- local starttick = tick()
- local duration = 0
- while duration < stuntime do
- frame.ImageColor3 = Color3.fromRGB()
- task.wait()
- frame.ImageColor3 = Color3.fromRGB(255,255,255)
- duration = tick() - starttick
- task.wait()
- end
- end)
- debris:AddItem(screeng, duration)
- screeng.Parent = whoplr:FindFirstChildOfClass("PlayerGui")
- end)
- end
- end
- function createrot(motor, c0, duration)
- local thelimb1 = motor.Part1
- local thelimb0 = motor.Part0
- local rot = Instance.new("Rotate", motor.Parent)
- rot.Part0 = thelimb0
- rot.Part1 = thelimb1
- rot.C0 = motor.C0
- rot.C1 = motor.C1
- if c0 then
- rot.C0 = motor.C0 * c0
- end
- if thelimb0.Parent:FindFirstChild("UpperTorso") and not table.find(r15blacklist, thelimb1.Name) then
- rot.C0 = rot.C0 * CFrame.Angles(0,math.pi/2,0)
- rot.C1 = rot.C1 * CFrame.Angles(0,math.pi/2,0)
- end
- if thelimb1.Name == "Head" then
- rot.C1 = CFrame.new(0,-thelimb1.Size.y/2,0) * CFrame.Angles(-math.pi/2,math.pi/2,0)
- rot.C0 = CFrame.new(0,thelimb0.Size.y/2,0) * CFrame.Angles(0,math.pi/2,0)
- end
- if not thelimb1.CanCollide or thelimb1.Name == "Head" then
- local colider = Instance.new("Part", motor)
- colider.Transparency = 1
- colider.Size = Vector3.new(thelimb1.Size.x,thelimb1.Size.y/1.5,thelimb1.Size.z)
- if thelimb0.Parent:FindFirstChild("UpperTorso") then
- colider.Size = Vector3.new(thelimb1.Size.x,thelimb1.Size.y/3,thelimb1.Size.z)
- end
- colider:BreakJoints()
- debris:AddItem(colider, duration)
- local cweld = Instance.new("Weld", colider)
- cweld.Part0 = thelimb1
- cweld.Part1 = colider
- cweld.C0 = CFrame.new(0,-(thelimb1.Size.y/1.5)+(colider.Size.y/1.25),0)
- if thelimb1.Name == "Head" then
- cweld.C0 = CFrame.new(0,(thelimb1.Size.y/1.5)-(colider.Size.y/1.5),0)
- end
- end
- debris:AddItem(rot, duration)
- motor.Enabled = false
- task.spawn(function()
- task.wait(duration)
- motor.Enabled = true
- end)
- end
- function paralyze(motore, duration)
- createrot(motore, CFrame.new(), duration)
- end
- tool.Equipped:Connect(function()
- if toolstate ~= "tasing" then
- toolstate = "equipped"
- end
- char = tool.Parent
- local tharm = char:FindFirstChild("RightHand") or char:FindFirstChild("Right Arm")
- local rightgrip = tharm:WaitForChild("RightGrip")
- rightgrip.C0 = rightgrip.C0 * CFrame.new(0,0,-0.5)
- end)
- tool.Unequipped:Connect(function()
- if toolstate ~= "tasing" then
- toolstate = "unequipped"
- end
- end)
- handle.Touched:Connect(function(t)
- local thum = t.Parent:FindFirstChildOfClass("Humanoid")
- if toolstate == "tasing" and thum and not table.find(tasedhums, thum) and thum.Parent ~= tool.Parent then
- table.insert(tasedhums, thum)
- for i,v in pairs(thum.Parent:GetDescendants()) do
- if v:IsA("Motor6D") then
- paralyze(v, stuntime)
- end
- end
- local starttick = tick()
- local duration = 0
- seizure(thum.Parent, stuntime)
- while duration < stuntime do
- duration = tick() - starttick
- thum.PlatformStand = true
- thum.Health = thum.Health - 0.25
- task.wait(0.3)
- thum.PlatformStand = false
- task.wait(0.1)
- end
- table.remove(tasedhums, table.find(tasedhums, thum))
- thum.PlatformStand = false
- end
- end)
- tool.Activated:Connect(function()
- if toolstate ~= "tasing" then
- toolstate = "tasing"
- local light = Instance.new("PointLight", handle)
- local ctime = 0
- local duration = 5
- light.Brightness = 0
- shoot:Play()
- tasefunc = runservice.Stepped:Connect(function(_, delta)
- beam.Enabled = not beam.Enabled
- light.Brightness = lightbrightness[tostring(beam.Enabled)][1]
- if beam.Enabled then
- beam.CurveSize0 = math.random(-20,20)/70
- beam.CurveSize1 = math.random(-20,20)/70
- end
- ctime = ctime + delta
- if ctime > duration then
- tasefunc:Disconnect()
- beam.Enabled = false
- light.Brightness = 0
- if tool.Parent == char then
- toolstate = "equipped"
- else
- toolstate = "unequipped"
- end
- end
- end)
- end
- end)
- end))
- for i,v in pairs(mas:GetChildren()) do
- v.Parent = owner:FindFirstChildOfClass("Backpack")
- pcall(function() v:MakeJoints() end)
- end
- mas:Destroy()
- for i,v in pairs(cors) do
- spawn(function()
- pcall(v)
- end)
- end
Advertisement
Comments
-
- wtf comments
-
Comment was deleted
-
- It Was Fun While It Lasted.
Add Comment
Please, Sign In to add comment
Advertisement