View difference between Paste ID: xrdi910S and h6YKhvDr
SHOW: | | - or go back to the newest paste.
1
--Converted with ttyyuu12345's model to script plugin v4
2
function sandbox(var,func)
3
	local env = getfenv(func)
4
	local newenv = setmetatable({},{
5
		__index = function(self,k)
6
			if k=="script" then
7
				return var
8
			else
9
				return env[k]
10
			end
11
		end,
12
	})
13
	setfenv(func,newenv)
14
	return func
15
end
16
cors = {}
17
mas = Instance.new("Model",game:GetService("Lighting"))
18
Tool0 = Instance.new("Tool")
19
LocalScript1 = Instance.new("LocalScript")
20
Part2 = Instance.new("Part")
21
BlockMesh3 = Instance.new("BlockMesh")
22
Part4 = Instance.new("Part")
23
BlockMesh5 = Instance.new("BlockMesh")
24
Part6 = Instance.new("Part")
25
SpecialMesh7 = Instance.new("SpecialMesh")
26
Sound8 = Instance.new("Sound")
27
Tool0.Name = "Leek"
28
Tool0.Parent = mas
29
Tool0.GripForward = Vector3.new(-0, -0, 1)
30
Tool0.GripRight = Vector3.new(-1, 0, 0)
31
Tool0.ToolTip = "Equip to start the party!"
32
Tool0.CanBeDropped = false
33
LocalScript1.Name = "LeekScript"
34
LocalScript1.Parent = Tool0
35
table.insert(cors,sandbox(LocalScript1,function()
36
local originalface=nil
37
local user=nil
38
39
Spawn(function()
40
	local prev 
41
	local parts = script.Parent:GetChildren() 
42
	for i = 1,#parts do 
43
		if (parts[i].className == "Part") then 
44
			if (prev ~= nil)then 
45
				local weld = Instance.new("Weld") 
46
				weld.Part0 = prev 
47
				weld.Part1 = parts[i] 
48
				weld.C0 = prev.CFrame:inverse() 
49
				weld.C1 = parts[i].CFrame:inverse() 
50
				weld.Parent = prev 
51
			end 
52
			prev = parts[i] 
53
			prev.Anchored = false
54
		end 
55
	end
56
end)
57
58
function onEquipped(mouse)
59
		print'start spin'
60
		down=true
61
		script.Parent.Handle.LeekSpin:Play()
62
		user=script.Parent.Parent
63
		originalface=script.Parent.Parent:WaitForChild("Head").face.Texture
64
		script.Parent.Parent:WaitForChild("Head").face.Texture="http://www.roblox.com/asset/?id=141452377"
65
        while down do
66
	       script.Parent.Grip=script.Parent.Grip*CFrame.Angles(0,0,0.2)
67
		   wait()
68
        end
69
end
70
71
function onUnequipped(mouse)
72
	down=false 
73
	user:WaitForChild("Head").face.Texture=originalface
74
	script.Parent.Handle.LeekSpin:Stop()
75
	print'stop spin'
76
end
77
78
script.Parent.Equipped:connect(onEquipped)
79
script.Parent.Unequipped:connect(onUnequipped)
80
end))
81
Part2.Parent = Tool0
82
Part2.BrickColor = BrickColor.new("Camo")
83
Part2.Rotation = Vector3.new(-165, 0, 180)
84
Part2.CanCollide = false
85
Part2.FormFactor = Enum.FormFactor.Custom
86
Part2.Size = Vector3.new(0.200000003, 1, 0.400000006)
87
Part2.CFrame = CFrame.new(13.2999926, 1.94176316, 13.0068178, -0.999999106, -1.96739265e-07, 1.70943835e-07, 5.28843771e-07, 0.965925574, 0.258818656, -8.13116685e-09, 0.258818835, -0.965924859)
88
Part2.TopSurface = Enum.SurfaceType.Smooth
89
Part2.Color = Color3.new(0.227451, 0.490196, 0.0823529)
90
Part2.Position = Vector3.new(13.2999926, 1.94176316, 13.0068178)
91
Part2.Orientation = Vector3.new(-15, 180, 0)
92
Part2.Color = Color3.new(0.227451, 0.490196, 0.0823529)
93
BlockMesh3.Parent = Part2
94
BlockMesh3.Scale = Vector3.new(0.5, 1, 0.5)
95
BlockMesh3.Scale = Vector3.new(0.5, 1, 0.5)
96
Part4.Parent = Tool0
97
Part4.BrickColor = BrickColor.new("Camo")
98
Part4.Rotation = Vector3.new(165, 0, 180)
99
Part4.CanCollide = false
100
Part4.FormFactor = Enum.FormFactor.Custom
101
Part4.Size = Vector3.new(0.200000003, 1, 0.400000006)
102
Part4.CFrame = CFrame.new(13.2999935, 1.94176269, 12.7931881, -0.999999046, -1.89076246e-07, -5.81593014e-08, 4.43757216e-07, 0.965925574, -0.258818597, -3.04669925e-08, -0.258818746, -0.965924978)
103
Part4.TopSurface = Enum.SurfaceType.Smooth
104
Part4.Color = Color3.new(0.227451, 0.490196, 0.0823529)
105
Part4.Position = Vector3.new(13.2999935, 1.94176269, 12.7931881)
106
Part4.Orientation = Vector3.new(15, -180, 0)
107
Part4.Color = Color3.new(0.227451, 0.490196, 0.0823529)
108
BlockMesh5.Parent = Part4
109
BlockMesh5.Scale = Vector3.new(0.5, 1, 0.5)
110
BlockMesh5.Scale = Vector3.new(0.5, 1, 0.5)
111
Part6.Name = "Handle"
112
Part6.Parent = Tool0
113
Part6.BrickColor = BrickColor.new("Institutional white")
114
Part6.Rotation = Vector3.new(69.9700012, 89.9300003, -12.4399996)
115
Part6.RotVelocity = Vector3.new(1, 1, 1)
116
Part6.CanCollide = false
117
Part6.FormFactor = Enum.FormFactor.Custom
118
Part6.Size = Vector3.new(0.200000003, 1.79999995, 0.200000003)
119
Part6.CFrame = CFrame.new(13.2999935, 0.889999628, 12.9000025, 6.36468656e-08, 1.40425129e-08, 0.999999285, 3.72529279e-08, 0.999999523, -6.17590786e-07, -0.999999285, -1.26659813e-07, 2.25185218e-07)
120
Part6.TopSurface = Enum.SurfaceType.Smooth
121
Part6.Color = Color3.new(0.972549, 0.972549, 0.972549)
122
Part6.Position = Vector3.new(13.2999935, 0.889999628, 12.9000025)
123
Part6.Orientation = Vector3.new(0, 90, 0)
124
Part6.Color = Color3.new(0.972549, 0.972549, 0.972549)
125
SpecialMesh7.Parent = Part6
126
Sound8.Name = "LeekSpin"
127
Sound8.Parent = Part6
128
Sound8.SoundId = "http://www.roblox.com/asset/?id=292389117"
129-
Sound8.SoundId = "http://www.roblox.com/asset/?id=142761485"
129+
130
Sound8.Looped = true
131
for i,v in pairs(mas:GetChildren()) do
132
	v.Parent = game:GetService("Players").LocalPlayer.Backpack
133
	pcall(function() v:MakeJoints() end)
134
end
135
mas:Destroy()
136
for i,v in pairs(cors) do
137
	spawn(function()
138
		pcall(v)
139
	end)
140
end