-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLocalScript.lua
More file actions
26 lines (19 loc) · 895 Bytes
/
LocalScript.lua
File metadata and controls
26 lines (19 loc) · 895 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
local Workspace = game:GetService("Workspace")
local ReplicatedFirst = game:GetService("ReplicatedFirst")
local Players = game:GetService("Players")
local localPlayer = Players.LocalPlayer
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local DeleteEvent = ReplicatedStorage.DataStoreEvents.DeleteData
local DropSword = ReplicatedStorage.SwordEvents.DropSword
local parent = script.Parent
parent.MouseButton1Click:Connect(function(input: InputObject)
--local storageOriginal = ReplicatedFirst.SwordPack
--local copyOfSword = storageOriginal:Clone()
--local humanRoot = localPlayer.Character.HumanoidRootPart.Position
--print("clicked")
--copyOfSword.Parent = Workspace
--copyOfSword.Handle.Position = Vector3.new(humanRoot.X + 2, humanRoot.Y, humanRoot.Z)
DeleteEvent:FireServer(0)
DropSword:FireServer()
script.Parent:Destroy()
end)