SHOW:
|
|
- or go back to the newest paste.
1 | script.Parent = workspace.CurrentCamera | |
2 | local plr = game:GetService("Players").LocalPlayer | |
3 | ||
4 | local tool = Instance.new("Tool",plr:WaitForChild("Backpack")) | |
5 | tool.Grip = CFrame.new(0,-0.8,-0.2) * CFrame.Angles(math.rad(0),math.rad(180),math.rad(0)) | |
6 | - | tool.Name = "bluE" |
6 | + | tool.Name = "Uno Card" |
7 | ||
8 | local part = Instance.new("Part",tool) | |
9 | part.Name = "Handle" | |
10 | - | part.Size = Vector3.new(4,6,4) |
10 | + | part.BrickColor = BrickColor.new("Really black") |
11 | part.Size = Vector3.new(3,0.4,5) | |
12 | part.TopSurface = "Smooth" | |
13 | part.BottomSurface = "Smooth" | |
14 | part.CanCollide = false | |
15 | part:BreakJoints() | |
16 | - | local mesh = Instance.new("SpecialMesh",part) |
16 | + | |
17 | - | mesh.MeshId = "rbxassetid://431003868" --mesh.MeshId = "rbxassetid://132920499" |
17 | + | edge = Instance.new("Decal") |
18 | - | mesh.TextureId = "rbxassetid://430627740" --"http://www.roblox.com/asset/?id=134479421" |
18 | + | edge.Name = "edge" |
19 | - | mesh.Scale = Vector3.new(2,2,2) |
19 | + | edge.Parent = part |
20 | edge.Texture = "http://www.roblox.com/asset/?id=45214611" | |
21 | edge.Face = Top | |
22 | ||
23 | plus4 = Instance.new("Decal") | |
24 | plus4.Name = "wildplus4cards" | |
25 | plus4.Parent = part | |
26 | plus4.Texture = "http://www.roblox.com/asset/?id=31088381" | |
27 | plus4.Face = Bottom | |
28 | ||
29 | local sound = Instance.new("Sound",part) | |
30 | sound.SoundId = "rbxassetid://511340819" | |
31 | sound.Volume = 3 | |
32 | ||
33 | local sound2 = Instance.new("Sound",part) | |
34 | sound2.SoundId = "rbxassetid://280667448" | |
35 | sound2.Volume = 5 | |
36 | ||
37 | local sound3 = Instance.new("Sound",part) | |
38 | sound3.SoundId = "rbxassetid://139100774" | |
39 | sound3.Volume = 10 | |
40 | ||
41 | local sound4 = Instance.new("Sound",part) | |
42 | sound4.SoundId = "rbxassetid://258057783" | |
43 | sound4.Volume = 10 | |
44 | ||
45 | local sound5 = Instance.new("Sound",part) | |
46 | sound5.SoundId = "rbxassetid://130932305" | |
47 | sound5.Volume = 10 | |
48 | ||
49 | local sound6 = Instance.new("Sound",part) | |
50 | sound6.SoundId = "rbxassetid://906084456" | |
51 | sound6.Volume = 10 | |
52 | sound6.TimePosition = 2 | |
53 | ||
54 | function firstHum(target) | |
55 | for i,v in pairs(target:GetChildren()) do | |
56 | if v:IsA("Humanoid") then | |
57 | return v | |
58 | end | |
59 | end | |
60 | return nil | |
61 | end | |
62 | ||
63 | local slap = false | |
64 | local cd = false | |
65 | ||
66 | plr:GetMouse().Button1Down:connect(function() | |
67 | if tool.Parent == plr.Character then | |
68 | if slap == false then | |
69 | slap = true | |
70 | sound2:Play() | |
71 | local str = Instance.new("StringValue") | |
72 | str.Name = "toolanim" | |
73 | str.Value = "Slash" | |
74 | str.Parent = tool | |
75 | wait(1) | |
76 | slap = false | |
77 | end | |
78 | end | |
79 | end) | |
80 | ||
81 | part.Touched:connect(function(hit) | |
82 | if slap == true then | |
83 | if cd == false then | |
84 | if not hit:IsDescendantOf(plr.Character) then | |
85 | if hit.Parent:IsA("Model") then | |
86 | local fhum = firstHum(hit.Parent) | |
87 | if fhum then | |
88 | cd = true | |
89 | fhum.PlatformStand = true | |
90 | sound:Play() | |
91 | local con1 | |
92 | con1 = game:GetService("RunService").Heartbeat:connect(function() | |
93 | fhum.PlatformStand = true | |
94 | end) | |
95 | wait(0.1) | |
96 | local vel = Instance.new("BodyVelocity",hit) | |
97 | vel.Velocity = ((hit.Position - plr.Character:WaitForChild("HumanoidRootPart").Position).unit + Vector3.new(0,0.5,0))*50 | |
98 | vel.MaxForce = Vector3.new(10000000,10000000,10000000) | |
99 | wait(1) | |
100 | cd = false | |
101 | vel:Destroy() | |
102 | local vel2 = Instance.new("BodyVelocity",hit) | |
103 | vel2.Velocity = Vector3.new(0,12.5,0) | |
104 | vel2.MaxForce = Vector3.new(10000000,10000000,10000000) | |
105 | local p2 = Instance.new("Part",hit) | |
106 | p2.Anchored = true | |
107 | p2.Transparency = 0.6 | |
108 | p2.CanCollide = false | |
109 | p2.Size = Vector3.new(0.2,0.2,0.2) | |
110 | p2.CFrame = CFrame.new(hit.CFrame.p) * CFrame.Angles(math.rad(0),math.rad(90),math.rad(0)) | |
111 | p2.BrickColor = BrickColor.new("New Yeller") | |
112 | p2.Material = "Neon" | |
113 | local m2 = Instance.new("CylinderMesh",p2) | |
114 | m2.Scale = Vector3.new(60,10000,60) | |
115 | local scln = sound3:Clone() | |
116 | scln.Parent = hit | |
117 | scln:Play() | |
118 | local con2 | |
119 | con2 = game:GetService("RunService").Heartbeat:connect(function() | |
120 | p2.CFrame = CFrame.new(hit.CFrame.p) * CFrame.Angles(math.rad(0),math.rad(90),math.rad(0)) | |
121 | end) | |
122 | wait(7) | |
123 | vel2.Velocity = Vector3.new(0,0,0) | |
124 | wait(0.5) | |
125 | scln:Stop() | |
126 | local scln3 = sound5:Clone() | |
127 | scln3.Parent = hit | |
128 | scln3:Play() | |
129 | wait(1) | |
130 | local bav = Instance.new("BodyAngularVelocity",hit) | |
131 | bav.AngularVelocity = Vector3.new(math.random(0,360),math.random(0,360),math.random(0,360)) | |
132 | vel2.Velocity = Vector3.new(0,-250,0) | |
133 | p2.BrickColor = BrickColor.new("Really red") | |
134 | local scln6 = sound6:Clone() | |
135 | scln6.Parent = hit | |
136 | scln6:Play() | |
137 | local continue = false | |
138 | local htc | |
139 | htc = hit.Touched:connect(function(hitp) | |
140 | if not hitp:IsDescendantOf(hit.Parent) then | |
141 | continue = true | |
142 | scln6:Stop() | |
143 | vel2:Destroy() | |
144 | con2:Disconnect() | |
145 | con1:Disconnect() | |
146 | htc:Disconnect() | |
147 | p2:Destroy() | |
148 | end | |
149 | end) | |
150 | repeat wait() until continue == true | |
151 | local ctab = {} | |
152 | for i=1,4 do | |
153 | local p = Instance.new("Part",hit) | |
154 | p.Size = Vector3.new(30,30,30) | |
155 | p.Anchored = true | |
156 | p.CanCollide = false | |
157 | p.TopSurface = "Smooth" | |
158 | p.BottomSurface = "Smooth" | |
159 | p.Color = Color3.fromRGB(255,math.random(0,255),0) | |
160 | p.CFrame = hit.CFrame | |
161 | local con | |
162 | con = game:GetService("RunService").Heartbeat:connect(function() | |
163 | p.CFrame = p.CFrame * CFrame.Angles(math.rad(math.random(0,360)),math.rad(math.random(0,360)),math.rad(math.random(0,360))) | |
164 | p.Transparency = p.Transparency + 0.01 | |
165 | if p.Transparency >= 1 then | |
166 | con:Disconnect() | |
167 | end | |
168 | end) | |
169 | table.insert(ctab,con) | |
170 | end | |
171 | Instance.new("Explosion",workspace).Position = hit.Position | |
172 | local scln2 = sound4:Clone() | |
173 | scln2.Parent = hit | |
174 | scln2:Play() | |
175 | vel2:Destroy() | |
176 | hit.Parent:BreakJoints() | |
177 | repeat wait() until not hit:IsDescendantOf(workspace) | |
178 | con2:Disconnect() | |
179 | end | |
180 | end | |
181 | end | |
182 | end | |
183 | end | |
184 | end) |