Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Converted with PenguinAnonymous'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")
- LocalScript4 = Instance.new("LocalScript")
- Script5 = Instance.new("Script")
- Script6 = Instance.new("Script")
- Script7 = Instance.new("Script")
- Tool0.Name = "Autistic Shuriken"
- Tool0.Parent = mas
- Tool0.TextureId = "rbxassetid://836025023"
- Tool0.GripForward = Vector3.new(-0.371201903, 0.00935677905, -0.928505063)
- Tool0.GripPos = Vector3.new(-0.600000024, 0, 0.699999988)
- Tool0.GripRight = Vector3.new(-0.00347340619, -0.99995625, -0.00868819654)
- Tool0.GripUp = Vector3.new(0.928545654, 0, -0.371218145)
- Tool0.ToolTip = "Even autistic people can be ninjas."
- Part1.Name = "Handle"
- Part1.Parent = Tool0
- Part1.Position = Vector3.new(20.5010128, 2.19976997, 4.5)
- Part1.Rotation = Vector3.new(-180, 0, -179.970001)
- Part1.FormFactor = Enum.FormFactor.Plate
- Part1.Size = Vector3.new(1, 0.400000006, 1)
- Part1.CFrame = CFrame.new(20.5010128, 2.19976997, 4.5, -0.999999821, 0.0004594778, 5.96046448e-08, 0.000459477829, 0.999999881, 2.03726813e-10, -8.94069672e-08, 2.32830644e-10, -0.999999881)
- Part1.BottomSurface = Enum.SurfaceType.Smooth
- Part1.TopSurface = Enum.SurfaceType.Smooth
- Part1.Position = Vector3.new(20.5010128, 2.19976997, 4.5)
- Part1.Orientation = Vector3.new(0, 180, 0.0299999993)
- Sound2.Name = "Fire"
- Sound2.Parent = Part1
- Sound2.SoundId = "rbxassetid://849861238"
- Sound2.Volume = 10
- SpecialMesh3.Parent = Part1
- SpecialMesh3.MeshId = "rbxassetid://482238802"
- SpecialMesh3.Scale = Vector3.new(2.29999995, 1.10000002, 1.10000002)
- SpecialMesh3.TextureId = "rbxassetid://552099844"
- SpecialMesh3.MeshType = Enum.MeshType.FileMesh
- SpecialMesh3.Scale = Vector3.new(2.29999995, 1.10000002, 1.10000002)
- LocalScript4.Name = "Local Gui"
- LocalScript4.Parent = Tool0
- table.insert(cors,sandbox(LocalScript4,function()
- Tool=script.Parent
- function onEquippedLocal(mouse)
- if mouse == nil then
- print("Mouse not found")
- return
- end
- mouse.Icon = "rbxasset://textures\\GunCursor.png"
- end
- Tool.Equipped:connect(onEquippedLocal)
- -- Autistic Shuriken created by SlenderMadMan
- end))
- Script5.Name = "BrickCleanup"
- Script5.Parent = Tool0
- Script5.Disabled = true
- table.insert(cors,sandbox(Script5,function()
- -- this script removes its parent from the workspace after 24 seconds
- s = script.Parent
- wait(15)
- s.Transparency = .1
- wait(.2)
- s.Transparency = .2
- wait(.2)
- s.Transparency = .3
- wait(.2)
- s.Transparency = .4
- wait(.2)
- s.Transparency = .5
- wait(.2)
- s.Transparency = .6
- wait(.2)
- s.Transparency = .7
- wait(.2)
- s.Transparency = .8
- wait(.2)
- script.Parent.Parent = nil
- end))
- Script6.Name = "StarScript"
- Script6.Parent = Tool0
- Script6.Disabled = true
- table.insert(cors,sandbox(Script6,function()
- arrow = script.Parent
- damage = 23
- local HitSound = Instance.new("Sound")
- HitSound.SoundId = "http://www.roblox.com/asset/?id=157878578"
- HitSound.Parent = arrow
- HitSound.Volume = 6
- function stick(hit)
- -- joint myself to the thing i hit
- local weld = Instance.new("Weld")
- weld.Part0 = arrow
- weld.Part1 = hit
- -- correction term to account for average skew between physics update and heartbeat
- local HitPos = arrow.Position --+ (-arrow.Velocity * (1/60)) --+ (arrow.CFrame.lookVector * .5)
- local CJ = CFrame.new(HitPos)
- local C0 = arrow.CFrame:inverse() *CJ
- local C1 = hit.CFrame:inverse() * CJ
- weld.C0 = C0
- weld.C1 = C1
- weld.Parent = arrow
- end
- function onTouched(hit)
- connection:disconnect()
- HitSound:Play()
- humanoid = hit.Parent:findFirstChild("Humanoid")
- if humanoid~=nil then
- local s = Instance.new("Part")
- s.formFactor = 2 -- plate
- s.Size = Vector3.new(1,.4,1)
- s.BrickColor = BrickColor.new("Bright red")
- local v = Vector3.new(math.random(-1,1), math.random(0,1), math.random(-1,1))
- s.Velocity = 15 * v
- s.CFrame = CFrame.new(arrow.Position + v, v)
- arrow.BrickCleanup:clone().Parent = s
- s.BrickCleanup.Disabled = false
- s.Parent = game.Workspace
- tagHumanoid(humanoid)
- humanoid:TakeDamage(damage)
- wait(1)
- untagHumanoid(humanoid)
- else
- stick(hit)
- end
- end
- function tagHumanoid(humanoid)
- -- todo: make tag expire
- local tag = arrow: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 = arrow.Touched:connect(onTouched)
- wait(2)
- arrow.Parent = nil
- end))
- Script7.Name = "NinjaStar"
- Script7.Parent = Tool0
- table.insert(cors,sandbox(Script7,function()
- Tool = script.Parent
- VELOCITY = 50 -- constant
- loaded=false
- local Pellet = Instance.new("Part")
- Pellet.Name="NinjaStar"
- Pellet.Locked = true
- Pellet.BackSurface = 0
- Pellet.BottomSurface = 0
- Pellet.FrontSurface = 0
- Pellet.LeftSurface = 0
- Pellet.RightSurface = 0
- Pellet.TopSurface = 0
- Pellet.Shape = 1
- Pellet.formFactor = 2
- Pellet.Size = Vector3.new(1,.4,1)
- Pellet.BrickColor = BrickColor.new(26)
- script.Parent.StarScript:clone().Parent = Pellet
- function fire(v)
- Tool.Parent.Torso["Right Shoulder"].MaxVelocity = 0.7
- Tool.Parent.Torso["Right Shoulder"].DesiredAngle = 3.6
- wait(.1)
- Tool.Parent.Torso["Right Shoulder"].MaxVelocity = 1
- Tool.Handle.Transparency=1
- Tool.Handle.Fire: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 launch = head.Position + 10 * v
- local missile = Pellet:clone()
- Tool.Handle.Mesh:clone().Parent = missile
- missile.Position = launch
- missile.Velocity = v * 150
- local force = Instance.new("BodyForce")
- force.force = Vector3.new(0,40,0)
- force.Parent = missile
- missile.StarScript.Disabled = false
- local creator_tag = Instance.new("ObjectValue")
- creator_tag.Value = vCharacter
- creator_tag.Name = "creator"
- creator_tag.Parent = missile
- bc = script.Parent.BrickCleanup
- bc:clone().Parent = missile
- missile.Parent = game.Workspace
- 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
- if loaded==true then
- loaded=false
- local targetPos = humanoid.TargetPoint
- local lookAt = (targetPos - character.Head.Position).unit
- fire(lookAt)
- wait(.3)
- Tool.Enabled = true
- elseif loaded==false then
- Tool.Parent.Torso["Right Shoulder"].MaxVelocity = 0.6
- Tool.Parent.Torso["Right Shoulder"].DesiredAngle = -3.6
- wait(.1)
- Tool.Handle.Transparency=0
- wait(.1)
- loaded=true
- end
- Tool.Enabled = true
- end
- script.Parent.Activated:connect(onActivated)
- end))
- for i,v in pairs(mas:GetChildren()) do
- v.Parent = workspace
- 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